C# Class Monobjc.Tools.Generator.Parsers.Sgml.Entity

An Entity declared in a DTD.
Inheritance: IDisposable
Mostra file Open project: Monobjc/monobjc-tools

Public Methods

Method Description
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.

Protected Methods

Method Description
Dispose ( bool isDisposing ) : void

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

Method Details

Close() public method

Closes the reader from which the entity is being read.
public Close ( ) : void
return void

Context() public method

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
return string

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

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.
return void

Entity() public method

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.
return System

Entity() public method

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.
return System

Entity() public method

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.
return System

Error() public method

Raise a processing error.
Always thrown.
public Error ( string msg ) : void
msg string The error message to use in the exception.
return void

Error() public method

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.
return void

Error() public method

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.
return void

Error() public method

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.
return void

ExpandCharEntity() public method

Expands a character entity to be read from the input stream.
public ExpandCharEntity ( ) : string
return string

IsLiteralType() public static method

Checks whether a token denotes a literal entity or not.
public static IsLiteralType ( string token ) : bool
token string The token to check.
return bool

Open() public method

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.
return void

ReadChar() public method

Reads the next character from the DTD stream.
public ReadChar ( ) : char
return char

ScanLiteral() public method

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.
return string

ScanToEnd() public method

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.
return string

ScanToken() public method

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.
return string

SetLiteralType() public method

Sets the entity to be a literal of the type specified.
public SetLiteralType ( string token ) : void
token string One of "CDATA", "SDATA" or "PI".
return void

SkipWhitespace() public method

Returns the next character after any whitespace.
public SkipWhitespace ( ) : char
return char