C# Class Z.Expressions.EvalContext

Datei anzeigen Open project: zzzprojects/Eval-Expression.NET Class Usage Examples

Public Methods

Method Description
Clone ( ) : EvalContext

Makes a shallow copy of current EvalContext.

Compile ( string code, Type>.IDictionary parameterTypes ) : object>.Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code ) : object>.Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, IEnumerable parameterTypes ) : object>.Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8, Type type9 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3, Type type4 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2, Type type3 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1, Type type2 ) : Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code, Type type1 ) : object>.Func

Compile the code or expression and return a delegate of type Func to execute.

Compile ( string code ) : Func

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type>.IDictionary parameterTypes ) : object>>.Task

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code ) : object>>.Task

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, IEnumerable parameterTypes ) : object>>.Task

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8, Type type9 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2, Type type3 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1, Type type2 ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code, Type type1 ) : object>>.Task

Compile the code or expression and return a delegate of type Func to execute.

CompileAsync ( string code ) : Task>

Compile the code or expression and return a delegate of type Func to execute.

EvalContext ( ) : System
ExecuteAsync ( string code ) : Task

Compile and evaluate the code or expression and return the result.

ExecuteAsync ( string code, object parameters ) : Task

Compile and evaluate the code or expression and return the result.

RegisterAlias ( string alias, string name ) : EvalContext

Registers an alias for a variable, constant or type name.

RegisterAssembly ( ) : EvalContext

Registers all types from all specified assemblies.

RegisterDefaultAlias ( ) : void

Registers default alias (Extension Methods, Names, Static Members, Types and Values).

RegisterDefaultAliasSafe ( ) : void

Registers default alias (Extension Methods, Names, Static Members, Types and Values).

RegisterDefaultAliasUnsafe ( ) : void

Registers default alias (Extension Methods, Names, Static Members, Types and Values).

RegisterDomainAssemblies ( ) : EvalContext

Registers all types from all domain assemblies.

RegisterExtensionMethod ( ) : EvalContext

Registers all extension methods from specified types.

RegisterGlobalConstant ( string name, object value ) : EvalContext

Registers a global constant.

RegisterGlobalVariable ( string name, object value ) : EvalContext

Registers a global variable.

RegisterMember ( ) : EvalContext
RegisterStaticMember ( ) : EvalContext

Registers static member from specified types.

RegisterType ( ) : EvalContext

Registers specified types using Type.Name and Type.FullName as alias.

UnregisterAlias ( ) : EvalContext

Unregisters all alias for a variable, constant or type name.

UnregisterAll ( ) : EvalContext

Unregisters all kind of alias (Extension Methods, Names, Static Members, Types and Values).

UnregisterAssembly ( ) : EvalContext

Unregisters all types from all specified assemblies.

UnregisterExtensionMethod ( ) : EvalContext

Unregisters all extension methods from the specified types.

UnregisterGlobalConstant ( ) : EvalContext

Unregisters a global constant.

UnregisterGlobalVariable ( ) : EvalContext

Unregisters a global variable.

UnregisterMember ( ) : EvalContext

Unregisters member from specified types.

UnregisterStaticMember ( ) : EvalContext

Unregisters static member from specified types.

UnregisterType ( ) : EvalContext

Unregisters specified types using Type.Name and Type.FullName as alias.

Method Details

Clone() public method

Makes a shallow copy of current EvalContext.
public Clone ( ) : EvalContext
return EvalContext

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type>.IDictionary parameterTypes ) : object>.Func
code string The code or expression to compile.
parameterTypes Type>.IDictionary Parameter types used to compile the code or expression.
return object>.Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code ) : object>.Func
code string The code or expression to compile.
return object>.Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, IEnumerable parameterTypes ) : object>.Func
code string The code or expression to compile.
parameterTypes IEnumerable Parameter types used to compile the code or expression.
return object>.Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8, Type type9 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
type8 System.Type The eighth type used to compile the code or expression.
type9 System.Type The ninth type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
type8 System.Type The eighth type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4, Type type5 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3, Type type4 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2, Type type3 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1, Type type2 ) : Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
return Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code, Type type1 ) : object>.Func
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
return object>.Func

Compile() public method

Compile the code or expression and return a delegate of type Func to execute.
public Compile ( string code ) : Func
code string The code or expression to compile.
return Func

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type>.IDictionary parameterTypes ) : object>>.Task
code string The code or expression to compile.
parameterTypes Type>.IDictionary Parameter types used to compile the code or expression.
return object>>.Task

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code ) : object>>.Task
code string The code or expression to compile.
return object>>.Task

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, IEnumerable parameterTypes ) : object>>.Task
code string The code or expression to compile.
parameterTypes IEnumerable Parameter types used to compile the code or expression.
return object>>.Task

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8, Type type9 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
type8 System.Type The eighth type used to compile the code or expression.
type9 System.Type The ninth type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7, Type type8 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
type8 System.Type The eighth type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
type7 System.Type The seventh type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5, Type type6 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
type6 System.Type The sixth type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4, Type type5 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
type5 System.Type The fifth type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3, Type type4 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
type4 System.Type The fourth type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2, Type type3 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
type3 System.Type The third type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1, Type type2 ) : Task>
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
type2 System.Type The second type used to compile the code or expression.
return Task>

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code, Type type1 ) : object>>.Task
code string The code or expression to compile.
type1 System.Type The first type used to compile the code or expression.
return object>>.Task

CompileAsync() public method

Compile the code or expression and return a delegate of type Func to execute.
public CompileAsync ( string code ) : Task>
code string The code or expression to compile.
return Task>

EvalContext() public method

public EvalContext ( ) : System
return System

ExecuteAsync() public method

Compile and evaluate the code or expression and return the result.
public ExecuteAsync ( string code ) : Task
code string The code or expression to evaluate.
return Task

ExecuteAsync() public method

Compile and evaluate the code or expression and return the result.
public ExecuteAsync ( string code, object parameters ) : Task
code string The code or expression to evaluate.
parameters object The parameter values used to evaluates the code or expression.
return Task

RegisterAlias() public method

Registers an alias for a variable, constant or type name.
Thrown an exception if the alias already exists.
public RegisterAlias ( string alias, string name ) : EvalContext
alias string The alias to register.
name string The variable, constant or type name to register for the specified alias.
return EvalContext

RegisterAssembly() public method

Registers all types from all specified assemblies.
public RegisterAssembly ( ) : EvalContext
return EvalContext

RegisterDefaultAlias() public method

Registers default alias (Extension Methods, Names, Static Members, Types and Values).
public RegisterDefaultAlias ( ) : void
return void

RegisterDefaultAliasSafe() public method

Registers default alias (Extension Methods, Names, Static Members, Types and Values).
public RegisterDefaultAliasSafe ( ) : void
return void

RegisterDefaultAliasUnsafe() public method

Registers default alias (Extension Methods, Names, Static Members, Types and Values).
public RegisterDefaultAliasUnsafe ( ) : void
return void

RegisterDomainAssemblies() public method

Registers all types from all domain assemblies.
public RegisterDomainAssemblies ( ) : EvalContext
return EvalContext

RegisterExtensionMethod() public method

Registers all extension methods from specified types.
public RegisterExtensionMethod ( ) : EvalContext
return EvalContext

RegisterGlobalConstant() public method

Registers a global constant.
Thrown an exception if the global constant name already exists.
public RegisterGlobalConstant ( string name, object value ) : EvalContext
name string The global constant name.
value object The global constant value.
return EvalContext

RegisterGlobalVariable() public method

Registers a global variable.
Thrown an exception if the global variable name already exists.
public RegisterGlobalVariable ( string name, object value ) : EvalContext
name string The global variable name.
value object The global variable value.
return EvalContext

RegisterMember() public method

public RegisterMember ( ) : EvalContext
return EvalContext

RegisterStaticMember() public method

Registers static member from specified types.
public RegisterStaticMember ( ) : EvalContext
return EvalContext

RegisterType() public method

Registers specified types using Type.Name and Type.FullName as alias.
public RegisterType ( ) : EvalContext
return EvalContext

UnregisterAlias() public method

Unregisters all alias for a variable, constant or type name.
public UnregisterAlias ( ) : EvalContext
return EvalContext

UnregisterAll() public method

Unregisters all kind of alias (Extension Methods, Names, Static Members, Types and Values).
public UnregisterAll ( ) : EvalContext
return EvalContext

UnregisterAssembly() public method

Unregisters all types from all specified assemblies.
public UnregisterAssembly ( ) : EvalContext
return EvalContext

UnregisterExtensionMethod() public method

Unregisters all extension methods from the specified types.
public UnregisterExtensionMethod ( ) : EvalContext
return EvalContext

UnregisterGlobalConstant() public method

Unregisters a global constant.
public UnregisterGlobalConstant ( ) : EvalContext
return EvalContext

UnregisterGlobalVariable() public method

Unregisters a global variable.
public UnregisterGlobalVariable ( ) : EvalContext
return EvalContext

UnregisterMember() public method

Unregisters member from specified types.
public UnregisterMember ( ) : EvalContext
return EvalContext

UnregisterStaticMember() public method

Unregisters static member from specified types.
public UnregisterStaticMember ( ) : EvalContext
return EvalContext

UnregisterType() public method

Unregisters specified types using Type.Name and Type.FullName as alias.
public UnregisterType ( ) : EvalContext
return EvalContext