Make some methods public for ViewCompilation.
This commit is contained in:
parent
84d2e027f5
commit
b79f8384b0
|
|
@ -71,6 +71,8 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
|
|||
_globalImports = RazorSourceDocument.ReadFrom(stream, filename: null, encoding: Encoding.UTF8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public CompilationResult Compile(RelativeFileInfo file)
|
||||
{
|
||||
|
|
@ -101,7 +103,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
|
|||
return _compilationService.Compile(codeDocument, cSharpDocument);
|
||||
}
|
||||
|
||||
protected virtual RazorCodeDocument CreateCodeDocument(string relativePath, Stream inputStream)
|
||||
public virtual RazorCodeDocument CreateCodeDocument(string relativePath, Stream inputStream)
|
||||
{
|
||||
var absolutePath = _fileProvider.GetFileInfo(relativePath)?.PhysicalPath ?? relativePath;
|
||||
|
||||
|
|
@ -128,7 +130,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
|
|||
return RazorCodeDocument.Create(source, imports);
|
||||
}
|
||||
|
||||
protected virtual RazorCSharpDocument ProcessCodeDocument(RazorCodeDocument codeDocument)
|
||||
public virtual RazorCSharpDocument ProcessCodeDocument(RazorCodeDocument codeDocument)
|
||||
{
|
||||
_engine.Process(codeDocument);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace RazorPageExecutionInstrumentationWebSite
|
|||
{
|
||||
}
|
||||
|
||||
protected override RazorCodeDocument CreateCodeDocument(string relativePath, Stream inputStream)
|
||||
public override RazorCodeDocument CreateCodeDocument(string relativePath, Stream inputStream)
|
||||
{
|
||||
// Normalize line endings to '\r\n' (CRLF). This removes core.autocrlf, core.eol, core.safecrlf, and
|
||||
// .gitattributes from the equation and treats "\r\n" and "\n" as equivalent. Does not handle
|
||||
|
|
|
|||
Loading…
Reference in New Issue