C# Класс Parser.TagBase

The base class for all the tags.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetTagMatchAttribute ( Type tag ) : MatchTagAttributeBase

Returns the match attribute of the specified class. This attribute is used to identify a tag in a text.

GetTagType ( Type tag ) : string

Returns the type of the specified tag (its identifier). This method is used by the Type property.

InitializeFromData ( ParserBase parser, string value, bool hasContents ) : void

Reads the tag from the specified data.

InitializeFromText ( ParserBase parser, string text, int position, TagBase parentTag ) : int

Reads the tag at the specified position in the specified word and separator array.

MatchEnd ( string text, int position ) : int

Returns a value indicating whether there is the tag ending at the specified position.

WriteEnd ( StringBuilder output ) : void

Writes the end of the tag.

WriteStart ( StringBuilder output ) : void

Writes the start of the tag.

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

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

Checks whether the tag is initialized, and throws an exception if not. This method should be called before a tag porperty or method is accessed.

InitializeCoreFromText ( ParserBase parser, string text, int position, TagBase parentTag ) : int

Reads the tag at the specified position in the specified word and separator array.

InitializeFromDataCore ( ParserBase parser, string value, bool hasContents ) : void

Reads the tag from the specified data.

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

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

Checks whether the tag is initialized, and throws an exception if not. This method should be called before a tag porperty or method is accessed.
protected CheckInitialized ( ) : void
Результат void

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

Returns the match attribute of the specified class. This attribute is used to identify a tag in a text.
public static GetTagMatchAttribute ( Type tag ) : MatchTagAttributeBase
tag System.Type
Результат MatchTagAttributeBase

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

Returns the type of the specified tag (its identifier). This method is used by the Type property.
public static GetTagType ( Type tag ) : string
tag System.Type
Результат string

InitializeCoreFromText() защищенный абстрактный Метод

Reads the tag at the specified position in the specified word and separator array.
protected abstract InitializeCoreFromText ( ParserBase parser, string text, int position, TagBase parentTag ) : int
parser ParserBase
text string
position int
parentTag TagBase /// The parent tag of this tag. This argument is used to determine /// the end of the tag (it can be the end of the parent tag). ///
Результат int

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

Reads the tag from the specified data.
public InitializeFromData ( ParserBase parser, string value, bool hasContents ) : void
parser ParserBase
value string
hasContents bool
Результат void

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

Reads the tag from the specified data.
protected InitializeFromDataCore ( ParserBase parser, string value, bool hasContents ) : void
parser ParserBase
value string
hasContents bool
Результат void

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

Reads the tag at the specified position in the specified word and separator array.
public InitializeFromText ( ParserBase parser, string text, int position, TagBase parentTag ) : int
parser ParserBase
text string
position int
parentTag TagBase /// The parent tag of this tag. This argument is used to determine /// the end of the tag (it can be the end of the parent tag). ///
Результат int

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

Returns a value indicating whether there is the tag ending at the specified position.
public MatchEnd ( string text, int position ) : int
text string
position int
Результат int

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

Writes the end of the tag.
public WriteEnd ( StringBuilder output ) : void
output StringBuilder
Результат void

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

Writes the start of the tag.
public abstract WriteStart ( StringBuilder output ) : void
output StringBuilder
Результат void