<commit_before>using System;
using System.Collections.Generic;
using System.Text;
using DDay.iCal;
using DDay.iCal.Components;
using DDay.iCal.DataTypes;
using DDay.iCal.Serialization;

namespace Example2
{
    public class Program
    {
        /// <summary>
        /// Creates a string representation of an event.
        /// </summary>
        /// <param name="evt">The event to display</param>
        /// <returns>A string representation of the event.</returns>
        static string GetDescription(Event evt)
        {
            string summary = evt.Summary + ": " + evt.Start.Local.ToShortDateString();

            if (evt.IsAllDay)
            {
                return summary + " (all day)";
            }
            else
            {
                summary += ", " + evt.Start.Local.ToShortTimeString();
                return summary + " (" + Math.Round((double)(evt.End - evt.Start).TotalHours) + " hours)";
            }
        }

        /// <summary>
        /// The main program execution.
        /// </summary>
        static void Main(string[] args)
        {
            // Create a new iCalendar
            iCalendar iCal = new iCalendar();
            
            // Create the event, and add it to the iCalendar
            Event evt = Event.Create(iCal);

            // Set information about the event
            evt.Start = DateTime.Today;
            evt.Start = evt.Start.AddHours(8);
            evt.End = evt.Start.AddHours(18); // This also sets the duration            
            evt.Description = "The event description";
            evt.Location = "Event location";
            evt.Summary = "18 hour event summary";

            // Set information about the second event
            evt = Event.Create(iCal);
            evt.Start = DateTime.Today.AddDays(5);            
            evt.End = evt.Start.AddDays(1);<commit_msg>Updated for changes made to DDay.iCal version 0.30.2<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using DDay.iCal;
using DDay.iCal.Components;
using DDay.iCal.DataTypes;
using DDay.iCal.Serialization;

namespace Example2
{
    public class Program
    {
        /// <summary>
        /// Creates a string representation of an event.
        /// </summary>
        /// <param name="evt">The event to display</param>
        /// <returns>A string representation of the event.</returns>
        static string GetDescription(Event evt)
        {
            string summary = evt.Summary + ": " + evt.Start.Local.ToShortDateString();

            if (evt.IsAllDay)
            {
                return summary + " (all day)";
            }
            else
            {
                summary += ", " + evt.Start.Local.ToShortTimeString();
                return summary + " (" + Math.Round((double)(evt.End - evt.Start).TotalHours) + " hours)";
            }
        }

        /// <summary>
        /// The main program execution.
        /// </summary>
        static void Main(string[] args)
        {
            // Create a new iCalendar
            iCalendar iCal = new iCalendar();
            
            // Create the event, and add it to the iCalendar
            Event evt = iCal.Create<Event>();

            // Set information about the event
            evt.Start = DateTime.Today.AddHours(8);            
            evt.End = evt.Start.AddHours(18); // This also sets the duration            
            evt.Description = "The event description";
            evt.Location = "Event location";
            evt.Summary = "18 hour event summary";

            // Set information about the second event
            evt = iCal.Create<Event>();
            evt.Start = DateTime.Today.AddDays(5);            
            evt.End = evt.Start.AddDays(1);
{'fraction_non_alphanumeric': 0.11326259946949602, 'fraction_numerical': 0.005305039787798408, 'mean_word_length': 1.5723055934515688, 'pattern_counts': {'":': 2, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1158247', 'n_tokens_mistral': 991, 'n_tokens_neox': 1004, 'n_words': 266}