C# 클래스 TextParser.Parser

파일 보기 프로젝트 열기: gratianlup/SecureDelete 1 사용 예제들

공개 메소드들

메소드 설명
AddFieldsFromAssembly ( string name ) : bool

Add the field from the given assembly as field filters.

AddFieldsFromAssembly ( string name, bool addReferences ) : bool

Add the field from the given assembly as field filters.

AddFieldsFromAssembly ( string name, bool addReferences, string fromNamespace ) : bool

Add the field from the given assembly as field filters.

GetLineNumber ( ) : int

Gets the number of lines the text has.

GetNextBlock ( ) : TextBlock?

Get the next block of text.

InitParsing ( ) : bool

Initialize the parsing engine.

InitParsing ( int startIndex ) : bool

Initialize the parsing engine.

LoadFilters ( IParserFilters filters ) : void

Load the filters from the given IParserFilters object.

LoadText ( StreamReader stream ) : bool

Loads the text from the given stream.

Parser ( ) : System

Default constructor.

Parser ( IParserFilters filters ) : System

Constructor with the possibility to load the word filters.

RemoveAllFilters ( ) : void

Removes all loaded filters.

ResetParser ( ) : void

Resets the parser.

ResetParser ( int startIndex ) : void

Resets the parser.

비공개 메소드들

메소드 설명
InitParser ( ) : void

Initializes the structures used by the parser.

Called by the constructor.

IsCommentSeparator ( string s ) : TextSeparator?

Checks if the given string is a comment separator.

IsField ( string s ) : bool

Checks if the given string is a field.

Optimized

IsKeyword ( string s ) : bool

Checks if the given string is a keyword.

Optimized

IsNumber ( string s ) : bool

Checks if a string represents a number;

IsOperator ( string s ) : bool

Checks if the given string is an operator.

Optimized

IsPartOfKeywordInvalid ( char c ) : bool

Checks if the given character is part of a string or comment separator.

IsSeparator ( char c ) : bool

Checks if the given string is a separator.

IsStringSeparator ( string s ) : TextSeparator?

Checks if the given string is a string separator.

StringContainsChar ( string s, char c ) : bool

Checks if a string contains a specific character.

메소드 상세

AddFieldsFromAssembly() 공개 메소드

Add the field from the given assembly as field filters.
public AddFieldsFromAssembly ( string name ) : bool
name string The name of the assembly or the exact path to it.
리턴 bool

AddFieldsFromAssembly() 공개 메소드

Add the field from the given assembly as field filters.
public AddFieldsFromAssembly ( string name, bool addReferences ) : bool
name string The name of the assembly or the exact path to it.
addReferences bool Add the fields from the assemblies referenced by the given one.
리턴 bool

AddFieldsFromAssembly() 공개 메소드

Add the field from the given assembly as field filters.
public AddFieldsFromAssembly ( string name, bool addReferences, string fromNamespace ) : bool
name string The name of the assembly or the exact path to it.
addReferences bool Add the fields from the assemblies referenced by the given one.
fromNamespace string Add fields only from the given namespaces.
리턴 bool

GetLineNumber() 공개 메소드

Gets the number of lines the text has.
public GetLineNumber ( ) : int
리턴 int

GetNextBlock() 공개 메소드

Get the next block of text.
public GetNextBlock ( ) : TextBlock?
리턴 TextBlock?

InitParsing() 공개 메소드

Initialize the parsing engine.
public InitParsing ( ) : bool
리턴 bool

InitParsing() 공개 메소드

Initialize the parsing engine.
public InitParsing ( int startIndex ) : bool
startIndex int The index in the text from where to start parsing.
리턴 bool

LoadFilters() 공개 메소드

Load the filters from the given IParserFilters object.
public LoadFilters ( IParserFilters filters ) : void
filters IParserFilters The IParserFilters derived class from where to load the filters.
리턴 void

LoadText() 공개 메소드

Loads the text from the given stream.
public LoadText ( StreamReader stream ) : bool
stream System.IO.StreamReader The stream from where to load the filters.
리턴 bool

Parser() 공개 메소드

Default constructor.
public Parser ( ) : System
리턴 System

Parser() 공개 메소드

Constructor with the possibility to load the word filters.
public Parser ( IParserFilters filters ) : System
filters IParserFilters
리턴 System

RemoveAllFilters() 공개 메소드

Removes all loaded filters.
public RemoveAllFilters ( ) : void
리턴 void

ResetParser() 공개 메소드

Resets the parser.
public ResetParser ( ) : void
리턴 void

ResetParser() 공개 메소드

Resets the parser.
public ResetParser ( int startIndex ) : void
startIndex int The index in the text from where to start parsing.
리턴 void