API Reference
IcsDocument
A standalone iCalendar stream containing one or more VCALENDAR objects.
Inheritance
- Object
- IcsDocument
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property EmailDataOpenResult.Calendar
- Method IcsDocument.Load
- Method IcsDocument.Load
- Method IcsDocument.Load
- Method IcsDocument.LoadAsync
- Method IcsDocument.LoadAsync
- Method IcsDocument.Parse
Constructors
public IcsDocument(String productId = "-//OfficeIMO//OfficeIMO.Email//EN") #Creates a document with one RFC 5545 VCALENDAR object.
Parameters
- productId System.String = "-//OfficeIMO//OfficeIMO.Email//EN"
Methods
public ContentLineComponent AddCalendar() #ContentLineComponentAdds an empty VCALENDAR root.
public IEnumerable<ContentLineComponent> GetComponents(String name, Boolean recursive = true) #IEnumerable<ContentLineComponent>Enumerates matching components across every calendar.
Parameters
- name System.String
- recursive System.Boolean = true
public static IcsDocument Load(Byte[] bytes, ContentLineReaderOptions options = null) #IcsDocumentLoads an iCalendar stream from memory.
Parameters
- bytes System.Byte[]
- options OfficeIMO.Email.ContentLineReaderOptions = null
public static IcsDocument Load(String filePath, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #IcsDocumentLoads an iCalendar file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static IcsDocument Load(Stream stream, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #IcsDocumentLoads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<IcsDocument> LoadAsync(String filePath, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #Task<IcsDocument>Asynchronously loads an iCalendar file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<IcsDocument> LoadAsync(Stream stream, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #Task<IcsDocument>Asynchronously loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static IcsDocument Parse(String text, ContentLineReaderOptions options = null) #IcsDocumentParses an iCalendar stream from text.
Parameters
- text System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
public Void Save(String filePath, ContentLineWriterOptions options = null) #VoidAtomically saves this document to a file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineWriterOptions = null
public Void Save(Stream stream, ContentLineWriterOptions options = null) #VoidSaves this document to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions = null
public Task SaveAsync(String filePath, ContentLineWriterOptions options = null, CancellationToken cancellationToken = null) #TaskAsynchronously atomically saves this document to a file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineWriterOptions = null
- cancellationToken System.Threading.CancellationToken = null
public Task SaveAsync(Stream stream, ContentLineWriterOptions options = null, CancellationToken cancellationToken = null) #TaskAsynchronously saves to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions = null
- cancellationToken System.Threading.CancellationToken = null
public String Serialize(ContentLineWriterOptions options = null) #StringSerializes this document to text using the configured output encoding.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions = null
public Byte[] ToBytes(ContentLineWriterOptions options = null) #Byte[]Serializes this document to bytes.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions = null
public IReadOnlyList<ContentLineValidationIssue> Validate() #IReadOnlyList<ContentLineValidationIssue>Validates stable RFC 5545 structure without rejecting unknown or extension properties.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public IList<ContentLineComponent> Calendars { get; } #Ordered VCALENDAR roots. Unknown properties and nested components are retained.