Class RtfSource
Represents a source of RTF content. It auto-converts from either a string, TextReader, or Stream. Using a Stream is preferred as an RTF file can switch binary encodings in the middle of a file
Inherited Members
Namespace: SharpRtfConvert
Assembly: SharpRtfConvert.dll
Syntax
public class RtfSource
Constructors
| Edit this page View SourceRtfSource(TextReader)
Create an RTF source from a reader
Declaration
public RtfSource(TextReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| TextReader | reader | The TextReader to use |
Properties
| Edit this page View SourceReader
A reader used to read text from the source
Declaration
public TextReader Reader { get; }
Property Value
| Type | Description |
|---|---|
| TextReader |
Operators
| Edit this page View Sourceimplicit operator RtfSource(Stream)
Declaration
public static implicit operator RtfSource(Stream value)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | value | RTF content |
Returns
| Type | Description |
|---|---|
| RtfSource |
implicit operator RtfSource(TextReader)
Implicitly convert a TextReader containing RTF content to an RtfSource
Declaration
public static implicit operator RtfSource(TextReader value)
Parameters
| Type | Name | Description |
|---|---|---|
| TextReader | value | RTF content |
Returns
| Type | Description |
|---|---|
| RtfSource |
implicit operator RtfSource(string)
Implicitly convert strings containing RTF content to an RtfSource
Declaration
public static implicit operator RtfSource(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | RTF content |
Returns
| Type | Description |
|---|---|
| RtfSource |