C# 클래스 YAMP.ParserExtensions

Useful extensions for the Parser class.
파일 보기 프로젝트 열기: FlorianRappl/YAMP

공개 메소드들

메소드 설명
AddCustomConstant ( this parser, String name, Double constant ) : void

Adds a custom constant to the parser (to the primary context).

AddCustomConstant ( this parser, String name, Value constant ) : void

Adds a custom constant to the parser (to the primary context).

AddCustomFunction ( this parser, String name, FunctionDelegate f ) : void

Adds a custom function to be used by the parser (to the primary context).

AddVariable ( this parser, String name, Value value ) : void

Adds a variable to be used by the parser (to the primary context).

Evaluate ( this parser, String input ) : Value

Execute the evaluation of this parser instance without any external symbols.

Evaluate ( this parser, String input, Object values ) : Value

Execute the evaluation of this parser instance with external symbols.

LoadPlugin ( this parser, Assembly assembly ) : System.Guid

Loads an external library (assembly) that uses IFunction, Operator, ..., into the primary context.

RemoveCustomConstant ( this parser, String name ) : void

Removes a custom constant (to the primary context).

RemoveCustomFunction ( this parser, String name ) : void

Removes a custom function (to the primary context).

RemoveVariable ( this parser, String name ) : void

Removes a variable from the workspace (to the primary context).

RenameConstant ( this parser, String oldName, String newName ) : void

Renames an existing constant (custom or defined).

RenameFunction ( this parser, String oldName, String newName ) : void

Renames an existing function (custom or defined).

UnloadPlugin ( this parser, System.Guid pluginId ) : void

Unloads a previously loaded plugin.

메소드 상세

AddCustomConstant() 공개 정적인 메소드

Adds a custom constant to the parser (to the primary context).
public static AddCustomConstant ( this parser, String name, Double constant ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the constant. ///
constant Double /// The value of the constant. ///
리턴 void

AddCustomConstant() 공개 정적인 메소드

Adds a custom constant to the parser (to the primary context).
public static AddCustomConstant ( this parser, String name, Value constant ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the constant. ///
constant Value /// The value of the constant. ///
리턴 void

AddCustomFunction() 공개 정적인 메소드

Adds a custom function to be used by the parser (to the primary context).
public static AddCustomFunction ( this parser, String name, FunctionDelegate f ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the function that should be added. ///
f FunctionDelegate /// The function that fulfills the signature Value f(Value v). ///
리턴 void

AddVariable() 공개 정적인 메소드

Adds a variable to be used by the parser (to the primary context).
public static AddVariable ( this parser, String name, Value value ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the variable that should be added. ///
value Value /// The value of the variable. ///
리턴 void

Evaluate() 공개 정적인 메소드

Execute the evaluation of this parser instance without any external symbols.
public static Evaluate ( this parser, String input ) : Value
parser this The parser to extend.
input String The input to evaluate.
리턴 Value

Evaluate() 공개 정적인 메소드

Execute the evaluation of this parser instance with external symbols.
public static Evaluate ( this parser, String input, Object values ) : Value
parser this The parser to extend.
input String The input to evaluate.
values Object /// The values in an anonymous object - containing name - value pairs. ///
리턴 Value

LoadPlugin() 공개 정적인 메소드

Loads an external library (assembly) that uses IFunction, Operator, ..., into the primary context.
public static LoadPlugin ( this parser, Assembly assembly ) : System.Guid
parser this The parser to extend.
assembly System.Reflection.Assembly /// The assembly to load as a plugin. ///
리턴 System.Guid

RemoveCustomConstant() 공개 정적인 메소드

Removes a custom constant (to the primary context).
public static RemoveCustomConstant ( this parser, String name ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the constant that should be removed. ///
리턴 void

RemoveCustomFunction() 공개 정적인 메소드

Removes a custom function (to the primary context).
public static RemoveCustomFunction ( this parser, String name ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the function that should be removed. ///
리턴 void

RemoveVariable() 공개 정적인 메소드

Removes a variable from the workspace (to the primary context).
public static RemoveVariable ( this parser, String name ) : void
parser this The parser to extend.
name String /// The name of the symbol corresponding to the variable that should be removed. ///
리턴 void

RenameConstant() 공개 정적인 메소드

Renames an existing constant (custom or defined).
public static RenameConstant ( this parser, String oldName, String newName ) : void
parser this The parser to extend.
oldName String The old name of the constant.
newName String The new name for the constant.
리턴 void

RenameFunction() 공개 정적인 메소드

Renames an existing function (custom or defined).
public static RenameFunction ( this parser, String oldName, String newName ) : void
parser this The parser to extend.
oldName String The old name of the function.
newName String The new name for the function.
리턴 void

UnloadPlugin() 공개 정적인 메소드

Unloads a previously loaded plugin.
public static UnloadPlugin ( this parser, System.Guid pluginId ) : void
parser this The parser to extend.
pluginId System.Guid The ID for the assembly to unload.
리턴 void