C# Класс Sgml.Entity

An Entity declared in a DTD.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
Close ( ) : void

Closes the reader from which the entity is being read.

Context ( ) : string

Returns a string giving information on how the entity is referenced and declared, walking up the parents until the top level parent entity is found.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Entity ( string name, Uri baseUri, TextReader stm, string proxy ) : System

Initialises a new instance of an Entity declared in a DTD.

Entity ( string name, string literal ) : System

Initialises a new instance of an Entity declared in a DTD.

Entity ( string name, string pubid, string uri, string proxy ) : System

Initialises a new instance of an Entity declared in a DTD.

Error ( string msg ) : void

Raise a processing error.

Error ( string msg, char ch ) : void

Raise a processing error.

Error ( string msg, int x ) : void

Raise a processing error.

Error ( string msg, string arg ) : void

Raise a processing error.

ExpandCharEntity ( ) : string

Expands a character entity to be read from the input stream.

IsLiteralType ( string token ) : bool

Checks whether a token denotes a literal entity or not.

Open ( Entity parent, Uri baseUri ) : void

Begins processing an entity.

ReadChar ( ) : char

Reads the next character from the DTD stream.

ScanLiteral ( StringBuilder sb, char quote ) : string

Read a literal from the input stream.

ScanToEnd ( StringBuilder sb, string type, string terminators ) : string

Reads input until the end of the input stream or until a string of terminator characters is found.

ScanToken ( StringBuilder sb, string term, bool nmtoken ) : string

Scans a token from the input stream and returns the result.

SetLiteralType ( string token ) : void

Sets the entity to be a literal of the type specified.

SkipWhitespace ( ) : char

Returns the next character after any whitespace.

Защищенные методы

Метод Описание
Dispose ( bool isDisposing ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Приватные методы

Метод Описание
ReadNumericEntityCode ( string &value ) : int

Описание методов

Close() публичный Метод

Closes the reader from which the entity is being read.
public Close ( ) : void
Результат void

Context() публичный Метод

Returns a string giving information on how the entity is referenced and declared, walking up the parents until the top level parent entity is found.
public Context ( ) : string
Результат string

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected Dispose ( bool isDisposing ) : void
isDisposing bool true if this method has been called by user code, false if it has been called through a finalizer.
Результат void

Entity() публичный Метод

Initialises a new instance of an Entity declared in a DTD.
public Entity ( string name, Uri baseUri, TextReader stm, string proxy ) : System
name string The name of the entity.
baseUri System.Uri The baseUri for the entity to read from the TextReader.
stm TextReader The TextReader to read the entity from.
proxy string The proxy server to use when retrieving any web content.
Результат System

Entity() публичный Метод

Initialises a new instance of an Entity declared in a DTD.
public Entity ( string name, string literal ) : System
name string The name of the entity.
literal string The literal value of the entity.
Результат System

Entity() публичный Метод

Initialises a new instance of an Entity declared in a DTD.
public Entity ( string name, string pubid, string uri, string proxy ) : System
name string The name of the entity.
pubid string The public id of the entity.
uri string The uri of the entity.
proxy string The proxy server to use when retrieving any web content.
Результат System

Error() публичный Метод

Raise a processing error.
Always thrown.
public Error ( string msg ) : void
msg string The error message to use in the exception.
Результат void

Error() публичный Метод

Raise a processing error.
Always thrown.
public Error ( string msg, char ch ) : void
msg string The error message to use in the exception.
ch char The unexpected character causing the error.
Результат void

Error() публичный Метод

Raise a processing error.
Always thrown.
public Error ( string msg, int x ) : void
msg string The error message to use in the exception.
x int The value causing the error.
Результат void

Error() публичный Метод

Raise a processing error.
Always thrown.
public Error ( string msg, string arg ) : void
msg string The error message to use in the exception.
arg string The argument for the error.
Результат void

ExpandCharEntity() публичный Метод

Expands a character entity to be read from the input stream.
public ExpandCharEntity ( ) : string
Результат string

IsLiteralType() публичный статический Метод

Checks whether a token denotes a literal entity or not.
public static IsLiteralType ( string token ) : bool
token string The token to check.
Результат bool

Open() публичный Метод

Begins processing an entity.
public Open ( Entity parent, Uri baseUri ) : void
parent Entity The parent of this entity.
baseUri System.Uri The base Uri for processing this entity within.
Результат void

ReadChar() публичный Метод

Reads the next character from the DTD stream.
public ReadChar ( ) : char
Результат char

ScanLiteral() публичный Метод

Read a literal from the input stream.
public ScanLiteral ( StringBuilder sb, char quote ) : string
sb StringBuilder The to use to build the literal.
quote char The delimiter for the literal.
Результат string

ScanToEnd() публичный Метод

Reads input until the end of the input stream or until a string of terminator characters is found.
public ScanToEnd ( StringBuilder sb, string type, string terminators ) : string
sb StringBuilder The to use to build the string.
type string The type of the element being read (only used in reporting errors).
terminators string The string of terminator characters to look for.
Результат string

ScanToken() публичный Метод

Scans a token from the input stream and returns the result.
public ScanToken ( StringBuilder sb, string term, bool nmtoken ) : string
sb StringBuilder The to use to process the token.
term string A set of characters to look for as terminators for the token.
nmtoken bool true if the token should be a NMToken, otherwise false.
Результат string

SetLiteralType() публичный Метод

Sets the entity to be a literal of the type specified.
public SetLiteralType ( string token ) : void
token string One of "CDATA", "SDATA" or "PI".
Результат void

SkipWhitespace() публичный Метод

Returns the next character after any whitespace.
public SkipWhitespace ( ) : char
Результат char