Method
Compile
static func Compile<TDelegate>(expression: ExpressionSyntax, references: IEnumerable<MetadataReference>? = null) -> TDelegate where TDelegate: Delegate
Declaring type: RavenCompiler
Namespace: Raven.CodeAnalysis
Assembly: Raven.CodeAnalysis.dll
Source file: RavenCompiler.cs
Compiles a delegate-valued Raven expression into TDelegate.
Type parameters
| Name | Description |
|---|---|
TDelegate |
The delegate type produced by the expression. |
Parameters
| Name | Type | Description |
|---|---|---|
expression |
ExpressionSyntax | A Raven expression that evaluates to the requested delegate type. |
references |
IEnumerable<MetadataReference>? | Additional metadata references required by the expression. Platform and currently loaded runtime assemblies are referenced automatically. |
Return value
TDelegate
The compiled delegate.
Errors
| Error | Description |
|---|---|
T:Raven.CodeAnalysis.RavenCompilationException |
The generated Raven compilation contains errors. |