Class CompilerHelper
Compiles dll on the fly.
Inheritance
System.Object
CompilerHelper
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.QualityTools.Testing
Assembly: Sartorius.SAF.QualityTools.dll
Syntax
public class CompilerHelper
Methods
View SourceCleanUpDirectory(String)
Declaration
public static void CleanUpDirectory(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
CompileCode(String, String)
Declaration
public static CompilerResults CompileCode(string code, string output)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | |
System.String | output |
Returns
Type | Description |
---|---|
System.CodeDom.Compiler.CompilerResults |
CompileFile(Assembly, String, String, String[])
Compiles a file.
Declaration
public static CompilerResults CompileFile(Assembly inputSource, string input, string output, params string[] references)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | inputSource | |
System.String | input | |
System.String | output | |
System.String[] | references |
Returns
Type | Description |
---|---|
System.CodeDom.Compiler.CompilerResults |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
CompileFileAndLoadAssembly(Assembly, String, String, String[])
Compiles a file and loads the assembly.
Declaration
public static Assembly CompileFileAndLoadAssembly(Assembly inputSource, string input, string output, params string[] references)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | inputSource | |
System.String | input | |
System.String | output | |
System.String[] | references |
Returns
Type | Description |
---|---|
System.Reflection.Assembly |
CreateOutput(String)
Declaration
public static void CreateOutput(string output)
Parameters
Type | Name | Description |
---|---|---|
System.String | output |
GenerateDynamicModule(String, String, String, String[])
Declaration
public static string GenerateDynamicModule(string assemblyName, string moduleName, string outpath, params string[] dependencies)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyName | |
System.String | moduleName | |
System.String | outpath | |
System.String[] | dependencies |
Returns
Type | Description |
---|---|
System.String |
GenerateDynamicModule(String, String, String[])
Declaration
public static string GenerateDynamicModule(string assemblyName, string moduleName, params string[] dependencies)
Parameters
Type | Name | Description |
---|---|---|
System.String | assemblyName | |
System.String | moduleName | |
System.String[] | dependencies |
Returns
Type | Description |
---|---|
System.String |
RemoveFile(String)
Removes the file at the specified path
.
Declaration
public static void RemoveFile(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The file path. |