C# Class WikiFunctions.CustomModules.CustomModuleCompiler

Datei anzeigen Open project: reedy/AutoWikiBrowser

Protected Properties

Property Type Description
Compiler System.CodeDom.Compiler.CodeDomProvider

Public Methods

Method Description
CanHandleLanguage ( string language ) : bool

This function checks if the current compiler can compile sources in a given language. By default, the language should match the current compiler's language name exactly, but descendants can override it so that, for example, C# 4.0 compiler could accept C# 2.0 cources.

Compile ( string sourceCode, CompilerParameters parameters ) : CompilerResults

Compiles given source code

GetList ( ) : WikiFunctions.CustomModules.CustomModuleCompiler[]

Returns the list of currently available compiler modules

ToString ( ) : string

Enforces that every class derived from this one will be properly displayed in a combo box.

Protected Methods

Method Description
Instantiate ( Assembly asm, string typeName ) : object
Instantiate ( Type type ) : object
LoadAssembly ( string path, string dependantAssembliesPrefix ) : Assembly

Private Methods

Method Description
AddToList ( List modules, Type type ) : void
CustomModuleCompiler ( ) : System
ResolveAssembly ( Object sender, ResolveEventArgs args ) : Assembly

Method Details

CanHandleLanguage() public method

This function checks if the current compiler can compile sources in a given language. By default, the language should match the current compiler's language name exactly, but descendants can override it so that, for example, C# 4.0 compiler could accept C# 2.0 cources.
public CanHandleLanguage ( string language ) : bool
language string Language name to check
return bool

Compile() public method

Compiles given source code
public Compile ( string sourceCode, CompilerParameters parameters ) : CompilerResults
sourceCode string Source code to compile. It will be automatically wrapped between /// CodeStart and CodeEnd.
parameters System.CodeDom.Compiler.CompilerParameters Compilation options.
return System.CodeDom.Compiler.CompilerResults

GetList() public static method

Returns the list of currently available compiler modules
public static GetList ( ) : WikiFunctions.CustomModules.CustomModuleCompiler[]
return WikiFunctions.CustomModules.CustomModuleCompiler[]

Instantiate() protected static method

protected static Instantiate ( Assembly asm, string typeName ) : object
asm System.Reflection.Assembly
typeName string
return object

Instantiate() protected static method

protected static Instantiate ( Type type ) : object
type System.Type
return object

LoadAssembly() protected static method

protected static LoadAssembly ( string path, string dependantAssembliesPrefix ) : Assembly
path string
dependantAssembliesPrefix string
return System.Reflection.Assembly

ToString() public method

Enforces that every class derived from this one will be properly displayed in a combo box.
public ToString ( ) : string
return string

Property Details

Compiler protected_oe property

To be assigned in descendant class' constructor
protected CodeDomProvider,System.CodeDom.Compiler Compiler
return System.CodeDom.Compiler.CodeDomProvider