Z-SoftNet Developer Network Library www.zsoftnet.com

CalendarParser.Parse Method (String, String)

Creates a calendar instance from the input stream.

public Calendar Parse(
   string input,
   string foldPattern
);

Parameters

input
Any of the supported valid inputs( http, file, string).
foldPattern
the folding pattern value for extra long lines.

Return Value

A valid Calendar object on success.

Remarks

Here are example usages for this method.

            	using ZsoftNet.iCalendar;
            	...
            	
            	ZsoftNet.iCalendar.Calendar oCalendar;
            	
            	//Get local file
            	CalendarParser oParser = new CalendarParser();
            	oCalendar = oCalParser.Parse("C:\CalFiles\Jan-Meetings.ics","\r\n "); 			
            	
            	//Get a file via HTTP
            	oCalendar = oCalParser.Parse("http://www.yourdomain.com/calendars/Events.ics","\r\n "); 	
            	
            	//Get stream of valid iCalendar data from any source as a string.
            	//Should return data like "BEGIN:VCALENDAR BEGIN:VEVENT... END:VEVENT END:VCALENDAR"
            	String calData = GetCalendarData();
            	oCalendar = oCalParser.Parse(calData,"\r\n "); 	
            	
            


See Also

CalendarParser Class | ZsoftNet.iCalendar Namespace | CalendarParser.Parse Overload List