Class ICalComponentReader
Reads iCalendar data from a stream and builds a tree of ICalComponent
objects by processing BEGIN/END component nesting (RFC 5545 §3.4).
Implements
Inherited Members
Namespace: DRIT.Mail.Rfc.ICal.Parsing
Assembly: DRIT.Mail.dll
Syntax
public sealed class ICalComponentReader : IDisposable
Constructors
View SourceICalComponentReader(Stream, Encoding?, bool)
Initializes a new instance of the ICalComponentReader class.
Declaration
public ICalComponentReader(Stream stream, Encoding? encoding = null, bool leaveOpen = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream to read from. |
| Encoding | encoding | The encoding used to decode bytes to strings. Defaults to UTF-8. |
| bool | leaveOpen | If true, the underlying stream is left open when this reader is disposed. |
Methods
View SourceDispose()
Processes the dispose data.
Declaration
public void Dispose()
ReadAll()
Reads all top-level components from the stream. Returns an empty list if the stream contains no components.
Declaration
public IReadOnlyList<ICalComponent> ReadAll()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<ICalComponent> |