IcsDocument
OfficeIMO.Email
A standalone iCalendar stream containing one or more VCALENDAR objects.
Inheritance
- object
- IcsDocument
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Property EmailDataOpenResult.Calendar
- Method EmailPortableContentCollection.ToCalendars
- Method EmailPortableContentExport.ToCalendar
- Method IcsDocument.Load
- 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 string = "-//OfficeIMO//OfficeIMO.Email//EN"
Methods
public IEnumerable<ContentLineComponent> GetComponents(string name, bool recursive = true) #Enumerates matching components across every calendar.
Parameters
- name string
- recursive bool = true
Returns
IEnumerable<ContentLineComponent>public static IcsDocument Load(byte[] bytes, ContentLineReaderOptions? options = null) #Loads an iCalendar stream from memory.
Parameters
- bytes byte[]
- options OfficeIMO.Email.ContentLineReaderOptions? = null
Returns
IcsDocumentpublic static IcsDocument Load(string filePath, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Loads an iCalendar file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
IcsDocumentpublic static IcsDocument Load(Stream stream, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
IcsDocumentpublic static async Task<IcsDocument> LoadAsync(string filePath, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads an iCalendar file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<IcsDocument>public static async Task<IcsDocument> LoadAsync(Stream stream, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<IcsDocument>public static IcsDocument Parse(string text, ContentLineReaderOptions? options = null) #Parses an iCalendar stream from text.
Parameters
- text string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
Returns
IcsDocumentpublic void Save(string filePath, ContentLineWriterOptions? options = null) #Atomically saves this document to a file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineWriterOptions? = null
public void Save(Stream stream, ContentLineWriterOptions? options = null) #Saves 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 = default) #Asynchronously atomically saves this document to a file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineWriterOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic Task SaveAsync(Stream stream, ContentLineWriterOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously saves to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic string Serialize(ContentLineWriterOptions? options = null) #Serializes this document to text using the configured output encoding.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions? = null
Returns
stringpublic byte[] ToBytes(ContentLineWriterOptions? options = null) #Serializes this document to bytes.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions? = null
Returns
byte[]public IReadOnlyList<ContentLineValidationIssue> Validate() #Validates stable RFC 5545 structure without rejecting unknown or extension properties.
Returns
IReadOnlyList<ContentLineValidationIssue>Inherited Methods
Properties
public IList<ContentLineComponent> Calendars { get; } #Ordered VCALENDAR roots. Unknown properties and nested components are retained.