CompilationResult Class¶
Constructors¶
-
Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.CompilationResult()
Creates a new instance of [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml).
protected CompilationResult()
-
Properties¶
-
CompilationFailures
()¶ Gets the @!:ICompilationFailure-s produced from parsing or compiling the Razor file.
Return type: System.Collections.Generic.IEnumerable{ICompilationFailure} public IEnumerable<ICompilationFailure> CompilationFailures { get; }
-
CompiledContent
()¶ Gets (or sets in derived types) the generated C# content that was compiled.
Return type: System.String public string CompiledContent { get; protected set; }
-
CompiledType
()¶ Gets (or sets in derived types) the type produced as a result of compilation.
Return type: System.Type public Type CompiledType { get; protected set; }
-
Methods¶
-
Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.EnsureSuccessful()
Gets the [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml).
Return type: Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult Returns: The current [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) instance. public CompilationResult EnsureSuccessful()
-
Failed
(System.Collections.Generic.IEnumerable<ICompilationFailure>)¶ Creates a [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) for a failed compilation.
Arguments: - compilationFailures (System.Collections.Generic.IEnumerable{ICompilationFailure}) – @!:ICompilationFailure-s produced from parsing or compiling the Razor file.
Return type: Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult
Returns: A [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) instance for a failed compilation.
public static CompilationResult Failed(IEnumerable<ICompilationFailure> compilationFailures)
-
Successful
(System.Type)¶ Creates a [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) for a successful compilation.
Arguments: - type (System.Type) – The compiled type.
Return type: Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult
Returns: A [Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult](Microsoft.AspNet.Mvc.Razor.Compilation.CompilationResult.yml) instance for a successful compilation.
public static CompilationResult Successful(Type type)
-