Class Document
Represents an ANSI.SYS formatted document.
Implements
Inherited Members
Namespace: SadConsole.Ansi
Assembly: SadConsole.dll
Syntax
public class Document : IDisposable
Constructors
Document(string)
Creates a new document from the provided file name.
Declaration
public Document(string file)
Parameters
Type | Name | Description |
---|---|---|
string | file | The file to load. |
Properties
AnsiBytes
Gets or sets the ANSI.SYS bytes that make up the document.
Declaration
public byte[] AnsiBytes { get; set; }
Property Value
Type | Description |
---|---|
byte[] |
AnsiString
A string representing the AnsiBytes.
Declaration
public string AnsiString { get; }
Property Value
Type | Description |
---|---|
string |
Stream
A stream that points to the AnsiBytes.
Declaration
public MemoryStream? Stream { get; }
Property Value
Type | Description |
---|---|
MemoryStream |
Methods
~Document()
Declaration
protected ~Document()
FromAsciiString(string)
Creates a new document from an existing string representing ANSI.SYS codes and characters.
Declaration
public static Document FromAsciiString(string ansiContent)
Parameters
Type | Name | Description |
---|---|---|
string | ansiContent | The ANSI.SYS encoded string. |
Returns
Type | Description |
---|---|
Document | A new document. |
FromBytes(byte[])
Creates a new document from an existing byte array representing ANSI.SYS codes and characters.
Declaration
public static Document FromBytes(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | The ANSI.SYS encoded byte array. |
Returns
Type | Description |
---|---|
Document | A new document. |