diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorProjectEngine.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorProjectEngine.cs index 1099be4c72..c8fc4f6f9b 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorProjectEngine.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorProjectEngine.cs @@ -88,19 +88,21 @@ namespace Microsoft.AspNetCore.Razor.Language return CreateCodeDocumentCore(sourceDocument, projectItem.FileKind, importSourceDocuments, tagHelpers: null, configureParser, configureCodeGeneration); } - protected RazorCodeDocument CreateCodeDocumentCore( + protected internal RazorCodeDocument CreateCodeDocumentCore( RazorSourceDocument sourceDocument, - string fileKind, - IReadOnlyList importSourceDocuments, - IReadOnlyList tagHelpers, - Action configureParser, - Action configureCodeGeneration) + string fileKind = null, + IReadOnlyList importSourceDocuments = null, + IReadOnlyList tagHelpers = null, + Action configureParser = null, + Action configureCodeGeneration = null) { if (sourceDocument == null) { throw new ArgumentNullException(nameof(sourceDocument)); } + importSourceDocuments = importSourceDocuments ?? Array.Empty(); + var parserOptions = GetRequiredFeature().Create(fileKind, builder => { ConfigureParserOptions(builder); diff --git a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs index 36166cfa79..aa716ece02 100644 --- a/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs +++ b/src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs @@ -348,16 +348,6 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests protected static string FullTypeName() => typeof(T).FullName.Replace('+', '.'); - protected RenderTreeFrame[] GetRenderTree(IComponent component) - { - throw null; - } - - protected RenderTreeFrame[] GetFrames(RenderFragment fragment) - { - throw null; - } - protected static void AssertSourceEquals(string expected, CompileToCSharpResult generated) { // Normalize the paths inside the expected result to match the OS paths