次の方法で共有


iCalendar Architecture

Topic Last Modified: 2007-06-19

The Microsoft.Exchange.Data.ContentTypes.iCalendar namespace provides a forward-only reader and writer for iCalendar data, in addition to supporting structures and classes for creating, accessing, and modifying iCalendar streams.

CalendarReader and CalendarWriter Classes

The CalendarReader and CalendarWriter classes provide the core functionality of the Microsoft.Exchange.Data.ContentTypes.iCalendar namespace.

The CalendarReader class takes a readable Stream as an argument to its constructors. You can then use the ReadFirstChildComponent, ReadNextSiblingComponent, and ReadNextComponent methods to sequentially access the iCalendar components in the data stream. Based on the value that you have set for the ComplianceMode property, errors in the iCalendar stream will cause an exception to be thrown or will cause the ComplianceStatus property to be set to a value other than Compliant. You can check this property to discover the issue with the incoming iCalendar data.

The CalendarWriter class takes a writable Stream as an argument to its constructors.

CalendarReader and CalendarWriter State Machines

The CalendarReader and CalendarWriter classes represent state machines. This means that calls to the various reading and writing methods on these classes, combined with the input stream, determine the methods that you can call next. For example, after you have called the ReadNextComponent method from a state that allows for it, you can use the PropertyReader property to read the properties on the current component.