C# 클래스 Composite.Core.Types.CodeGenerationManager

Handles all dynamic type compilations and the generation of Composite.Generated.dll
파일 보기 프로젝트 열기: Orckestra/C1-CMS

Private Properties

프로퍼티 타입 설명
AddCompiledAssembly void
ClearOldTempFiles void
CodeGenerationManager System
Compile void
Flush void
LoadAssembliesToMemory Exception>>.ICollection
PopulateBuilder void
ValidateCompositeGenerate void

공개 메소드들

메소드 설명
AddAssemblyCodeProvider ( ICodeProvider codeProvider ) : void

Use this method to add a ICodeProvider implementation that will be used when (and only) generating the final Composite.Generated.dll.

CompileRuntimeTempTypes ( Composite.Core.Types.CodeGenerationBuilder codeGenerationBuilder, bool verbose = true ) : IEnumerable

This method will compile the type defined in codeGenerationBuilder and return the result types. These types exists in a temp assembly, that will be deleted when the app domain is terminated.

GenerateCompositeGeneratedAssembly ( bool forceGeneration = false ) : void

This method will recompile Composite.Generated.dll and drop it into bin.

GetCompiledType ( string fullName ) : Type

Gets the compiled types.

IsCompiledAtRuntime ( Type type ) : bool

This method returns true if the given type type is compiled at runetime. Otherwise false.

IsRecompileNeeded ( Type dependableType, IEnumerable dependingTypes ) : bool

This method returns true if the types given by dependingTypes needs a recompile because they either is null or the type given by dependableType has changed and there for exists in a compiled at runtime assembly.

비공개 메소드들

메소드 설명
AddCompiledAssembly ( Assembly newAssembly ) : void
ClearOldTempFiles ( ) : void
CodeGenerationManager ( ) : System
Compile ( Composite.Core.Types.CodeGenerationBuilder builder ) : void
Flush ( ) : void
LoadAssembliesToMemory ( StringCollection assemblyLocations ) : Exception>>.ICollection
PopulateBuilder ( Composite.Core.Types.CodeGenerationBuilder builder ) : void
ValidateCompositeGenerate ( System.DateTime time ) : void

Validates that the current Composite.Generated.dll is not compiled after the given time. If it is compiled after the given time. Any attempts to recompile Composite.Generated.dll will be ignored. This is used to stop app domains from shutting each other down by recompiles.

메소드 상세

AddAssemblyCodeProvider() 공개 정적인 메소드

Use this method to add a ICodeProvider implementation that will be used when (and only) generating the final Composite.Generated.dll.
public static AddAssemblyCodeProvider ( ICodeProvider codeProvider ) : void
codeProvider ICodeProvider
리턴 void

CompileRuntimeTempTypes() 공개 정적인 메소드

This method will compile the type defined in codeGenerationBuilder and return the result types. These types exists in a temp assembly, that will be deleted when the app domain is terminated.
public static CompileRuntimeTempTypes ( Composite.Core.Types.CodeGenerationBuilder codeGenerationBuilder, bool verbose = true ) : IEnumerable
codeGenerationBuilder Composite.Core.Types.CodeGenerationBuilder
verbose bool
리턴 IEnumerable

GenerateCompositeGeneratedAssembly() 공개 정적인 메소드

This method will recompile Composite.Generated.dll and drop it into bin.
public static GenerateCompositeGeneratedAssembly ( bool forceGeneration = false ) : void
forceGeneration bool
리턴 void

GetCompiledType() 공개 정적인 메소드

Gets the compiled types.
public static GetCompiledType ( string fullName ) : Type
fullName string
리턴 System.Type

IsCompiledAtRuntime() 공개 정적인 메소드

This method returns true if the given type type is compiled at runetime. Otherwise false.
public static IsCompiledAtRuntime ( Type type ) : bool
type System.Type
리턴 bool

IsRecompileNeeded() 공개 정적인 메소드

This method returns true if the types given by dependingTypes needs a recompile because they either is null or the type given by dependableType has changed and there for exists in a compiled at runtime assembly.
public static IsRecompileNeeded ( Type dependableType, IEnumerable dependingTypes ) : bool
dependableType System.Type A type that all the types given by depends on.
dependingTypes IEnumerable All types in this enumerable should either be null or depend on the typoe given by
리턴 bool