C# Class Evaluator.Eval

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
GetVirtualParameters ( bool debug, string assemblyName ) : CompilerParameters

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

Private Methods

Méthode Description
Eval ( ) : System

Method Details

CreateAssembly() public static méthode

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 ///
Résultat AssemblyResults

CreateMethod() public static méthode

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 ///
Résultat MethodResults

CreateType() public static méthode

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 ///
Résultat TypeResults

CreateVirtualAssembly() public static méthode

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. ///
Résultat AssemblyResults

CreateVirtualMethod() public static méthode

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. ///
Résultat MethodResults

CreateVirtualType() public static méthode

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. ///
Résultat TypeResults

GetVirtualParameters() protected static méthode

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. ///
Résultat System.CodeDom.Compiler.CompilerParameters