C# Class Evaluator.Eval

A class providing static methods for the language-independent runtime compilation of .NET source code.
Mostra file Open project: swax/SwarmNLP

Public Methods

Method Description
CreateAssembly ( ICodeCompiler compiler, string assemblySource, CompilerParameters options, Language language ) : AssemblyResults

Compiles an assembly from the provided source with the parameters specified.

CreateMethod ( ICodeCompiler compiler, string methodSource, string methodName, CompilerParameters options, Language language ) : MethodResults

Compiles a method from the provided source with the parameters specified.

CreateType ( ICodeCompiler compiler, string typeSource, string typeName, CompilerParameters options, Language language ) : TypeResults

Compiles a type (or class) from the provided source with the parameters specified.

CreateVirtualAssembly ( ICodeCompiler compiler, string assemblySource, Language language, bool debug ) : AssemblyResults

Compiles an assembly from the provided source and stores it in memory using the parameters specified.

CreateVirtualMethod ( ICodeCompiler compiler, string methodSource, string methodName, Language language, bool debug ) : MethodResults

Compiles a method from the provided source and stores it in memory with the parameters specified.

CreateVirtualType ( ICodeCompiler compiler, string typeSource, string typeName, Language language, bool debug ) : TypeResults

Compiles a type (or class) from the provided source and stores it in memory using the parameters specified.

Protected Methods

Method Description
GetVirtualParameters ( bool debug, string assemblyName ) : CompilerParameters

Creates a CompilerParameters object containing the default settings for an assembly generated in memory.

Private Methods

Method Description
Eval ( ) : System

Method Details

CreateAssembly() public static method

Compiles an assembly from the provided source with the parameters specified.
public static CreateAssembly ( ICodeCompiler compiler, string assemblySource, CompilerParameters options, Language language ) : AssemblyResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
assemblySource string /// The actual source of the assembly. ///
options System.CodeDom.Compiler.CompilerParameters /// The parameters to be set for the compiler. ///
language Language /// A specification of the syntax of the language of the code ///
return AssemblyResults

CreateMethod() public static method

Compiles a method from the provided source with the parameters specified.
public static CreateMethod ( ICodeCompiler compiler, string methodSource, string methodName, CompilerParameters options, Language language ) : MethodResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
methodSource string /// The actual source of the method. ///
methodName string /// The name of the method. ///
options System.CodeDom.Compiler.CompilerParameters /// The parameters to be set for the compiler. ///
language Language /// A specification of the syntax of the language of the code ///
return MethodResults

CreateType() public static method

Compiles a type (or class) from the provided source with the parameters specified.
public static CreateType ( ICodeCompiler compiler, string typeSource, string typeName, CompilerParameters options, Language language ) : TypeResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
typeSource string /// The actual source of the type. ///
typeName string /// The name of the type. ///
options System.CodeDom.Compiler.CompilerParameters /// The parameters to be set for the compiler. ///
language Language /// A specification of the syntax of the language of the code ///
return TypeResults

CreateVirtualAssembly() public static method

Compiles an assembly from the provided source and stores it in memory using the parameters specified.
public static CreateVirtualAssembly ( ICodeCompiler compiler, string assemblySource, Language language, bool debug ) : AssemblyResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
assemblySource string /// The actual source of the assembly. ///
language Language /// A specification of the syntax of the language of the code ///
debug bool /// Determines whether debug information is included in the compiled assembly. ///
return AssemblyResults

CreateVirtualMethod() public static method

Compiles a method from the provided source and stores it in memory with the parameters specified.
public static CreateVirtualMethod ( ICodeCompiler compiler, string methodSource, string methodName, Language language, bool debug ) : MethodResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
methodSource string /// The actual source of the method. ///
methodName string /// The name of the method. ///
language Language /// A specification of the syntax of the language of the code ///
debug bool /// Determines whether debug information is included in the compiled assembly. ///
return MethodResults

CreateVirtualType() public static method

Compiles a type (or class) from the provided source and stores it in memory using the parameters specified.
public static CreateVirtualType ( ICodeCompiler compiler, string typeSource, string typeName, Language language, bool debug ) : TypeResults
compiler ICodeCompiler /// The compiler to use for compiling the source to MSIL. ///
typeSource string /// The actual source of the type. ///
typeName string /// The name of the type. ///
language Language /// A specification of the syntax of the language of the code ///
debug bool /// Determines whether debug information is included in the compiled assembly. ///
return TypeResults

GetVirtualParameters() protected static method

Creates a CompilerParameters object containing the default settings for an assembly generated in memory.
protected static GetVirtualParameters ( bool debug, string assemblyName ) : CompilerParameters
debug bool /// Determines whether debug information is included in the compiler's final output. ///
assemblyName string /// The name of the resulting assembly. ///
return System.CodeDom.Compiler.CompilerParameters