Class ICalLineReader
Reads lines from a stream, applying iCalendar line unfolding (RFC 5545 §3.1). A line longer than 75 octets is folded by inserting CRLF followed by a single space or tab; unfolding removes the CRLF and the single whitespace character.
Implements
Inherited Members
Namespace: DRIT.Mail.Rfc.ICal.Parsing
Assembly: DRIT.Mail.dll
Syntax
public sealed class ICalLineReader : IDisposable
Constructors
View SourceICalLineReader(Stream, Encoding?, bool)
Initializes a new instance of the ICalLineReader class.
Declaration
public ICalLineReader(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()
ReadLine()
Reads a single unfolded line from the stream. Returns null at EOF. The line terminator is not included.
Declaration
public string? ReadLine()
Returns
| Type | Description |
|---|---|
| string |
ReadLines()
Reads all remaining unfolded lines from the stream.
Declaration
public IReadOnlyList<string> ReadLines()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |