Z-SoftNet Developer Network Library www.zsoftnet.com

Calendar.Validate Method ()

Validates the calendar object only. It does NOT validate nested components and properties.

public void Validate();

Remarks



Examples of usage for this method to validate the iCalendar data with the rich object model.

            	using ZsoftNet.iCalendar;
            	using ZsoftNet.iCalendar.Components;
            	...
            	
            	ZsoftNet.iCalendar.Calendar oCalendar;
            	
            	CalendarParser oParser = new CalendarParser();
            	oCalendar = oCalParser.Parse("C:\CalFiles\Jan-Meetings.ics"); 
            	
            	//Validate that all the Properties and Components according to the
            	//iCalendar specification requirements for properties and parameters
            	oCalendar.Validate();
            	
            	//You can validate only the components
            	foreach(ZsoftNet.iCalendar.Component c in oCalendar.Components)
            	{
            		c.Validate();
            	}
            	
            	//After calling ToBindable(), you can Validate only certain types of Components
            	oCalendar.ToBindable();
            	
            	//Validate Events only
            	foreach(ZsoftNet.iCalendar.Components.VEvent ev in oCalendar.Events)
            	{
            		ev.Validate();
            	}
            	
            	
            


See Also

Calendar Class | ZsoftNet.iCalendar Namespace | Calendar.Validate Overload List