Beispiel #1
0
        /// <summary>
        /// Adds an <see cref="iCalObject"/>-based component to the
        /// appropriate collection.  Currently, the iCalendar component
        /// supports the following components:
        ///     <list>
        ///         <item>Event</item>
        ///         <item>FreeBusy</item>
        ///         <item>Journal</item>
        ///         <item>TimeZone</item>
        ///         <item>Todo</item>
        ///     </list>
        /// </summary>
        /// <param name="child"></param>
        public override void AddChild(iCalObject child)
        {
            Type type = child.GetType();

            switch (type.Name)
            {
            case "Event": Events.Add(child); break;

            case "FreeBusy": FreeBusy.Add(child); break;

            case "Journal": Journal.Add(child); break;

            case "TimeZone": TimeZone.Add(child); break;

            case "Todo": Todo.Add(child); break;

            default: break;
            }
        }