CompilerServiceBase
Provides a base implementation of a compiler service.
Constructors
Constructor | Description |
new(codeLanguage, markupParserFactory)
Signature: (codeLanguage:RazorCodeLanguage * markupParserFactory:ParserBaseCreator) -> unit
|
Initialises a new instance of CompilerServiceBase |
Instance members
Instance member | Description |
BuildTypeName(templateType, modelType)
Signature: (templateType:Type * modelType:Type) -> string
Modifiers: abstract |
Builds a type name for the specified template type. Returns: The string type name (including namespace). |
CodeInspectors()
Signature: unit -> unit
Modifiers: abstract |
Gets or sets the set of code inspectors. |
CodeLanguage()
Signature: unit -> unit
|
Gets the code language. |
CompileType(context)
Signature: context:TypeContext -> Type * CompilationData
Modifiers: abstract |
Compiles the type defined in the specified type context. Returns: The compiled type. |
Debug()
Signature: unit -> unit
Modifiers: abstract |
Gets or sets whether the compiler service is operating in debug mode. |
DisableTempFileLocking()
Signature: unit -> unit
Modifiers: abstract |
Gets or sets whether the compiler should load assemblies with Assembly.Load(byte[]) to prevent files from being locked. |
Dispose()
Signature: unit -> unit
Modifiers: abstract |
Disposes the current instance. |
GetCodeCompileUnit(...)
Signature: (className:string * template:ITemplateSource * namespaceImports:ISet<string> * templateType:Type * modelType:Type) -> string
|
Gets the source code from Razor for the given template. Returns: |
GetCodeCompileUnit(context)
Signature: context:TypeContext -> string
|
Gets the code compile unit used to compile a type. Returns: A used to compile a type. |
IncludeAssemblies()
Signature: unit -> IEnumerable<string>
Modifiers: abstract |
Returns a set of assemblies that must be referenced by the compiled template. Returns: The set of assemblies. |
IncludeReferences()
Signature: unit -> IEnumerable<CompilerReference>
Modifiers: abstract |
Returns a set of references that must be referenced by the compiled template. Returns: The set of references. |
InspectSource(results, context)
Signature: (results:GeneratorResults * context:TypeContext) -> string
Modifiers: abstract |
Inspects the source and returns the source code. Returns: |
MarkupParserFactory()
Signature: unit -> unit
|
Gets the markup parser. |
ReferenceResolver()
Signature: unit -> unit
Modifiers: abstract |
Gets or sets the assembly resolver. |
SourceFileExtension
Signature: string
Modifiers: abstract |
Extension of a source file without dot ("cs" for C# files or "vb" for VB.NET files). |