CompilationResult Struct¶
Represents the result of compilation.
- Namespace
Microsoft.AspNetCore.Mvc.Razor.Compilation
- Assemblies
- Microsoft.AspNetCore.Mvc.Razor
Syntax¶
public struct CompilationResult
-
struct
Microsoft.AspNetCore.Mvc.Razor.Compilation.
CompilationResult
Constructors¶
-
CompilationResult
(System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Diagnostics.CompilationFailure>)¶ Initializes a new instance of
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult
for a failed compilation.Arguments: compilationFailures (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Diagnostics.CompilationFailure>) – Microsoft.AspNetCore.Diagnostics.CompilationFailure
s produced from parsing or compiling the Razor file.public CompilationResult(IEnumerable<CompilationFailure> compilationFailures)
-
CompilationResult
(System.Type) Initializes a new instance of
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult
for a successful compilation.Arguments: type (System.Type) – The compiled type. public CompilationResult(Type type)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult.
CompilationFailures
¶ Gets the
Microsoft.AspNetCore.Diagnostics.CompilationFailure
s produced from parsing or compiling the Razor file.Return type: System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Diagnostics.CompilationFailure> public IEnumerable<CompilationFailure> CompilationFailures { get; }
-
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult.
CompiledType
¶ Gets the type produced as a result of compilation.
Return type: System.Type public Type CompiledType { get; }
-
Methods¶
-
EnsureSuccessful
()¶ Gets the
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationResult
.public void EnsureSuccessful()
-