Z-SoftNet Developer Network Library www.zsoftnet.com

Calendar.Validate Method (Boolean)

Validates the calendar and all of its properties and components.

public void Validate(
   bool validateAll
);

Parameters

validateAll
Indicates if all the properties and components need to be validated.

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(false);
            	
            	//You can validate only the components
            	foreach(ZsoftNet.iCalendar.Component c in oCalendar.Components)
            	{
            		c.Validate(true);
            	}
            	
            	//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(false);
            	}
            	
            	
            


See Also

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