Example #1
0
 /// <summary>
 /// This static method can be used to load property values into an existing instance of a calendar from a
 /// string.
 /// </summary>
 /// <param name="calendarText">A set of calendar properties in a string</param>
 /// <param name="calendar">The calendar instance into which the properties will be loaded</param>
 /// <remarks>The properties of the specified calendar will be cleared before the new properties are
 /// loaded into it.</remarks>
 /// <example>
 /// <code language="cs">
 /// VCalendar vCalendar = new VCalendar();
 /// VCalendarParser.ParseFromString(calendarString, vCalendar);
 /// </code>
 /// <code language="vbnet">
 /// Dim vCalendar As New VCalendar
 /// VCalendarParser.ParseFromString(calendarString, vCalendar)
 /// </code>
 /// </example>
 public static void ParseFromString(string calendarText, VCalendar calendar)
 {
     VCalendarParser vcp = new VCalendarParser(calendar);
     vcp.ParseString(calendarText);
 }
Example #2
0
 /// <summary>
 /// Constructor. Parses given VCalendar string and stores internally as VCalendar object.
 /// </summary>
 /// <param name="icalContent"></param>
 public EventManager(string icalContent)
 {
     calendar = new VCalendarParser();
     calendar.ParseString(icalContent);
 }
Example #3
0
        /// <summary>
        /// This static method can be used to load property values into a new instance of a calendar from a
        /// string.
        /// </summary>
        /// <param name="calendarText">A set of calendar properties in a string</param>
        /// <returns>A new calendar instance as created from the string</returns>
        /// <example>
        /// <code language="cs">
        /// VCalendar vCal = VCalendarParser.ParseFromString(calendar);
        /// </code>
        /// <code language="vbnet">
        /// Dim vCal As VCalendar = VCalendarParser.ParseFromString(calendar)
        /// </code>
        /// </example>
        public static VCalendar ParseFromString(string calendarText)
        {
            VCalendarParser vcp = new VCalendarParser();
            vcp.ParseString(calendarText);

            return vcp.VCalendar;
        }