C# Class Axiom.Scripting.ParseHelper

Class contining helper methods for parsing text files.
ファイルを表示 Open project: WolfgangSt/axiom

Public Methods

Method Description
Combine ( string items, int start, int end ) : string

Helper method for taking a string array and returning a single concatenated string composed of the range of specified elements.

GetParams ( string all ) : string[]

Helper method to remove the first item from a string array and return a new array 1 element smaller starting at the second element of the original array. This helpe to seperate the params from the command in the various script files.

LogParserError ( string attribute, string context, string reason ) : void

Helper method to log a formatted error when encountering problems with parsing an attribute.

ReadLine ( TextReader reader ) : string

Helper method to nip/tuck the string before parsing it. This includes trimming spaces from the beginning and end of the string, as well as removing excess spaces in between values.

SkipToNextCloseBrace ( TextReader reader ) : void

Advances in the stream until it hits the next }.

SkipToNextOpenBrace ( TextReader reader ) : void

Advances in the stream until it hits the next {.

Method Details

Combine() public static method

Helper method for taking a string array and returning a single concatenated string composed of the range of specified elements.
public static Combine ( string items, int start, int end ) : string
items string
start int
end int
return string

GetParams() public static method

Helper method to remove the first item from a string array and return a new array 1 element smaller starting at the second element of the original array. This helpe to seperate the params from the command in the various script files.
public static GetParams ( string all ) : string[]
all string
return string[]

LogParserError() public static method

Helper method to log a formatted error when encountering problems with parsing an attribute.
public static LogParserError ( string attribute, string context, string reason ) : void
attribute string
context string
reason string
return void

ReadLine() public static method

Helper method to nip/tuck the string before parsing it. This includes trimming spaces from the beginning and end of the string, as well as removing excess spaces in between values.
public static ReadLine ( TextReader reader ) : string
reader TextReader
return string

SkipToNextCloseBrace() public static method

Advances in the stream until it hits the next }.
public static SkipToNextCloseBrace ( TextReader reader ) : void
reader TextReader
return void

SkipToNextOpenBrace() public static method

Advances in the stream until it hits the next {.
public static SkipToNextOpenBrace ( TextReader reader ) : void
reader TextReader
return void