Make some methods public for ViewCompilation.

This commit is contained in:
Ryan Nowak 2017-01-30 13:46:27 -08:00
parent 84d2e027f5
commit b79f8384b0
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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