RazorEngine


CSharpRoslynCompilerService

Defined in RazorEngine.Roslyn.dll.
A concrete ICompilerService implementation for C# by using the Roslyn compiler.

Constructors

ConstructorDescription
new(strictMode, markupParserFactory)
Signature: (strictMode:bool * markupParserFactory:Func<ParserBase>) -> unit

Instance members

Instance memberDescription
BuildTypeName(templateType, modelType)
Signature: (templateType:Type * modelType:Type) -> string
Modifiers: abstract
Build a C# typename.
CreateOptions(context)
Signature: context:TypeContext -> CompilationOptions
Modifiers: abstract
Creates a CSharpCompilationOptions instance.
GetEmptyCompilation(assemblyName)
Signature: assemblyName:string -> Compilation
Modifiers: abstract
Creates a CSharpCompilation instance
GetSyntaxTree(...)
Signature: (sourceCode:string * sourceCodePath:string) -> SyntaxTree
Modifiers: abstract
Creates a CSharpSyntaxTree instance.
IncludeReferences()
Signature: unit -> IEnumerable<CompilerReference>
Modifiers: abstract
Returns a set of assemblies that must be referenced by the compiled template.
InspectSource(results, context)
Signature: (results:GeneratorResults * context:TypeContext) -> string
Modifiers: abstract
Inspects the GeneratorResults and returns the source code.
SourceFileExtension()
Signature: unit -> string
Modifiers: abstract
Returns "cs".
Fork me on GitHub