From cb5b8a45f1ffeaad8c246c51f22a118cc12af4b4 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Tue, 21 Feb 2017 16:33:29 -0800 Subject: [PATCH] [Fixes #959] Generate LineMapping for Using statements with source - Also generate/test IR baselines with all code generation tests --- .../DesignTimeCSharpRenderer.cs | 12 +- .../CodeGeneration/RuntimeCSharpRenderer.cs | 12 +- .../CodeGenerationIntegrationTest.cs | 124 +++++++++++++++++- .../ImportsIntegrationTest.cs | 25 ---- .../AddTagHelperDirective_DesignTime.ir.txt | 15 +++ .../Await_DesignTime.ir.txt | 56 ++++++++ .../Await_Runtime.ir.txt | 48 +++++++ .../BasicImports.cshtml | 0 .../BasicImports_DesignTime.codegen.cs | 34 +++++ .../BasicImports_DesignTime.ir.txt | 17 +++ .../BasicImports_DesignTime.mappings.txt | 0 .../BasicImports_Imports0.cshtml | 0 .../BasicImports_Imports1.cshtml | 0 .../BasicImports_Runtime.codegen.cs | 31 +++++ .../BasicImports_Runtime.ir.txt} | 6 +- .../Blocks_DesignTime.ir.txt | 54 ++++++++ .../Blocks_Runtime.ir.txt | 48 +++++++ .../CodeBlockAtEOF_DesignTime.ir.txt | 14 ++ .../CodeBlockAtEOF_Runtime.ir.txt | 8 ++ ...CodeBlockWithTextElement_DesignTime.ir.txt | 20 +++ .../CodeBlockWithTextElement_Runtime.ir.txt | 14 ++ .../CodeBlock_DesignTime.ir.txt | 14 ++ .../CodeBlock_Runtime.ir.txt | 8 ++ .../ConditionalAttributes_DesignTime.ir.txt | 81 ++++++++++++ .../ConditionalAttributes_Runtime.ir.txt | 55 ++++++++ .../DesignTime_DesignTime.ir.txt | 40 ++++++ .../EmptyCodeBlock_DesignTime.ir.txt | 15 +++ .../EmptyCodeBlock_Runtime.ir.txt | 9 ++ .../EmptyExplicitExpression_DesignTime.ir.txt | 15 +++ .../EmptyExplicitExpression_Runtime.ir.txt | 9 ++ ...ImplicitExpressionInCode_DesignTime.ir.txt | 16 +++ ...ptyImplicitExpressionInCode_Runtime.ir.txt | 10 ++ .../EmptyImplicitExpression_DesignTime.ir.txt | 16 +++ .../EmptyImplicitExpression_Runtime.ir.txt | 10 ++ .../ExplicitExpressionAtEOF_DesignTime.ir.txt | 15 +++ .../ExplicitExpressionAtEOF_Runtime.ir.txt | 9 ++ ...icitExpressionWithMarkup_DesignTime.ir.txt | 17 +++ ...xplicitExpressionWithMarkup_Runtime.ir.txt | 11 ++ .../ExplicitExpression_DesignTime.ir.txt | 16 +++ .../ExplicitExpression_Runtime.ir.txt | 10 ++ .../ExpressionsInCode_DesignTime.ir.txt | 27 ++++ .../ExpressionsInCode_Runtime.ir.txt | 21 +++ .../FunctionsBlockMinimal_DesignTime.ir.txt | 15 +++ .../FunctionsBlockMinimal_Runtime.ir.txt | 10 ++ .../FunctionsBlock_DesignTime.ir.txt | 19 +++ .../FunctionsBlock_Runtime.ir.txt | 13 ++ .../HiddenSpansInCode_DesignTime.ir.txt | 15 +++ .../HiddenSpansInCode_Runtime.ir.txt | 9 ++ ...lCommentWithQuote_Double_DesignTime.ir.txt | 14 ++ ...HtmlCommentWithQuote_Double_Runtime.ir.txt | 8 ++ ...lCommentWithQuote_Single_DesignTime.ir.txt | 14 ++ ...HtmlCommentWithQuote_Single_Runtime.ir.txt | 8 ++ .../ImplicitExpressionAtEOF_DesignTime.ir.txt | 15 +++ .../ImplicitExpressionAtEOF_Runtime.ir.txt | 9 ++ .../ImplicitExpression_DesignTime.ir.txt | 19 +++ .../ImplicitExpression_Runtime.ir.txt | 13 ++ .../Inherits_DesignTime.ir.txt | 18 +++ .../Inherits_Runtime.ir.txt | 11 ++ .../InlineBlocks_DesignTime.ir.txt | 26 ++++ .../InlineBlocks_Runtime.ir.txt | 19 +++ .../Instrumented_DesignTime.ir.txt | 58 ++++++++ .../Instrumented_Runtime.ir.txt | 51 +++++++ .../MarkupInCodeBlock_DesignTime.ir.txt | 19 +++ .../MarkupInCodeBlock_Runtime.ir.txt | 13 ++ .../NestedCSharp_DesignTime.ir.txt | 21 +++ .../NestedCSharp_Runtime.ir.txt | 15 +++ .../NestedCodeBlocks_DesignTime.ir.txt | 16 +++ .../NestedCodeBlocks_Runtime.ir.txt | 10 ++ .../NoLinePragmas_DesignTime.ir.txt | 55 ++++++++ .../NoLinePragmas_Runtime.ir.txt | 49 +++++++ ...llConditionalExpressions_DesignTime.ir.txt | 38 ++++++ .../NullConditionalExpressions_Runtime.ir.txt | 32 +++++ .../OpenedIf_DesignTime.ir.txt | 19 +++ .../OpenedIf_Runtime.ir.txt | 11 ++ .../ParserError_DesignTime.ir.txt | 14 ++ .../ParserError_Runtime.ir.txt | 8 ++ .../RazorComments_DesignTime.ir.txt | 28 ++++ .../RazorComments_Runtime.ir.txt | 22 ++++ ...RemoveTagHelperDirective_DesignTime.ir.txt | 15 +++ .../Sections_DesignTime.ir.txt | 42 ++++++ .../Sections_Runtime.ir.txt | 34 +++++ .../SimpleUnspacedIf_DesignTime.ir.txt | 16 +++ .../SimpleUnspacedIf_Runtime.ir.txt | 10 ++ .../StringLiterals_DesignTime.ir.txt | 24 ++++ .../StringLiterals_Runtime.ir.txt | 16 +++ .../Templates_DesignTime.ir.txt | 74 +++++++++++ .../Templates_Runtime.ir.txt | 69 ++++++++++ ...finishedExpressionInCode_DesignTime.ir.txt | 17 +++ .../UnfinishedExpressionInCode_Runtime.ir.txt | 11 ++ .../Usings_DesignTime.codegen.cs | 30 ++++- .../Usings_DesignTime.ir.txt | 30 +++++ .../Usings_DesignTime.mappings.txt | 4 +- .../Usings_Runtime.codegen.cs | 30 ++++- .../Usings_Runtime.ir.txt | 20 +++ 94 files changed, 2095 insertions(+), 43 deletions(-) delete mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/ImportsIntegrationTest.cs create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt rename test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/{ImportsIntegrationTest => CodeGenerationIntegrationTest}/BasicImports.cshtml (100%) create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.codegen.cs create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.mappings.txt rename test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/{ImportsIntegrationTest => CodeGenerationIntegrationTest}/BasicImports_Imports0.cshtml (100%) rename test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/{ImportsIntegrationTest => CodeGenerationIntegrationTest}/BasicImports_Imports1.cshtml (100%) create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.codegen.cs rename test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/{ImportsIntegrationTest/BasicImports.ir.txt => CodeGenerationIntegrationTest/BasicImports_Runtime.ir.txt} (59%) create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.ir.txt create mode 100644 test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.ir.txt diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs index 4992de82aa..95174cbee3 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/DesignTimeCSharpRenderer.cs @@ -59,7 +59,17 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration public override void VisitUsingStatement(UsingStatementIRNode node) { - Context.Writer.WriteUsing(node.Content); + if (node.Source.HasValue) + { + using (new LinePragmaWriter(Context.Writer, node.Source.Value)) + { + Context.Writer.WriteUsing(node.Content); + } + } + else + { + Context.Writer.WriteUsing(node.Content); + } } public override void VisitCSharpStatement(CSharpStatementIRNode node) diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/RuntimeCSharpRenderer.cs b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/RuntimeCSharpRenderer.cs index 4e37c2a96c..4b71736aba 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/RuntimeCSharpRenderer.cs +++ b/src/Microsoft.AspNetCore.Razor.Evolution/CodeGeneration/RuntimeCSharpRenderer.cs @@ -93,7 +93,17 @@ namespace Microsoft.AspNetCore.Razor.Evolution.CodeGeneration public override void VisitUsingStatement(UsingStatementIRNode node) { - Context.Writer.WriteUsing(node.Content); + if (node.Source.HasValue) + { + using (new LinePragmaWriter(Context.Writer, node.Source.Value)) + { + Context.Writer.WriteUsing(node.Content); + } + } + else + { + Context.Writer.WriteUsing(node.Content); + } } public override void VisitHtmlAttribute(HtmlAttributeIRNode node) diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/CodeGenerationIntegrationTest.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/CodeGenerationIntegrationTest.cs index 91e343d495..d1f13cf38b 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/CodeGenerationIntegrationTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/CodeGenerationIntegrationTest.cs @@ -14,6 +14,21 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests public class CodeGenerationIntegrationTest : IntegrationTestBase { #region Runtime + [Fact] + public void BasicImports_Runtime() + { + // Arrange + var engine = RazorEngine.Create(builder => builder.Features.Add(new ApiSetsIRTestAdapter())); + var document = CreateCodeDocument(); + + // Act + engine.Process(document); + + // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); + AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); + } + [Fact] public void UnfinishedExpressionInCode_Runtime() { @@ -25,6 +40,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -39,6 +55,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -53,6 +70,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -67,6 +85,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -81,6 +100,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -95,6 +115,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -109,6 +130,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -123,6 +145,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -137,6 +160,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -151,6 +175,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -165,6 +190,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -179,6 +205,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -193,6 +220,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -207,6 +235,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -221,6 +250,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -235,6 +265,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -249,6 +280,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -263,6 +295,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -277,6 +310,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -291,6 +325,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -305,6 +340,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -319,6 +355,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -333,6 +370,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -347,6 +385,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -361,6 +400,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -375,6 +415,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -389,6 +430,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -403,6 +445,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -417,6 +460,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -431,6 +475,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -445,6 +490,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -459,6 +505,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -473,6 +520,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -487,6 +535,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -501,6 +550,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -515,6 +565,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -529,6 +580,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -543,6 +595,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); } @@ -730,6 +783,21 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests #endregion #region DesignTime + [Fact] + public void BasicImports_DesignTime() + { + // Arrange + var engine = RazorEngine.CreateDesignTime(builder => builder.Features.Add(new ApiSetsIRTestAdapter())); + var document = CreateCodeDocument(); + + // Act + engine.Process(document); + + // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); + AssertDesignTimeDocumentMatchBaseline(document); + } + [Fact] public void UnfinishedExpressionInCode_DesignTime() { @@ -741,6 +809,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -755,6 +824,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -769,6 +839,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -783,6 +854,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -797,6 +869,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -811,6 +884,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -825,6 +899,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -839,6 +914,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -853,6 +929,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -867,6 +944,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -881,6 +959,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -895,6 +974,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -909,6 +989,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -923,6 +1004,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -937,6 +1019,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -951,6 +1034,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -965,6 +1049,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -979,6 +1064,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -993,6 +1079,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1007,6 +1094,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1021,6 +1109,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1035,6 +1124,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1049,6 +1139,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1063,6 +1154,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1077,6 +1169,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1091,6 +1184,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1105,6 +1199,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1119,6 +1214,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1133,6 +1229,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1147,6 +1244,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1161,6 +1259,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1175,6 +1274,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1189,6 +1289,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1203,6 +1304,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1217,6 +1319,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1231,6 +1334,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1245,6 +1349,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1259,6 +1364,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1273,6 +1379,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1287,6 +1394,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1301,6 +1409,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests engine.Process(document); // Assert + AssertIRMatchesBaseline(document.GetIRDocument()); AssertDesignTimeDocumentMatchBaseline(document); } @@ -1482,8 +1591,21 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests throw new XunitException($"The resource {sourceFilename} was not found."); } + var imports = new List(); + while (true) + { + var importsFilename = Path.ChangeExtension(normalizedFileName + "_Imports" + imports.Count.ToString(), ".cshtml"); + if (!TestFile.Create(importsFilename).Exists()) + { + break; + } + + imports.Add( + TestRazorSourceDocument.CreateResource(importsFilename, encoding: null, normalizeNewLines: true)); + } + var codeDocument = RazorCodeDocument.Create( - TestRazorSourceDocument.CreateResource(sourceFilename, encoding: null, normalizeNewLines: true)); + TestRazorSourceDocument.CreateResource(sourceFilename, encoding: null, normalizeNewLines: true), imports); // This will ensure that we're not putting any randomly generated data in a baseline. codeDocument.Items[DefaultRazorCSharpLoweringPhase.SuppressUniqueIds] = "test"; diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/ImportsIntegrationTest.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/ImportsIntegrationTest.cs deleted file mode 100644 index 0eab7f0bd0..0000000000 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/IntegrationTests/ImportsIntegrationTest.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Xunit; - -namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests -{ - public class ImportsIntegrationTest : IntegrationTestBase - { - [Fact] - public void BasicImports() - { - // Arrange - var engine = RazorEngine.Create(); - - var document = CreateCodeDocument(); - - // Act - engine.Process(document); - - // Assert - AssertIRMatchesBaseline(document.GetIRDocument()); - } - } -} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt new file mode 100644 index 0000000000..729a9cbc45 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AddTagHelperDirective_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AddTagHelperDirective_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (14:0,14 [17] AddTagHelperDirective.cshtml) - "*, TestAssembly" + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (31:0,31 [2] AddTagHelperDirective.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt new file mode 100644 index 0000000000..1a6982bdd5 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_DesignTime.ir.txt @@ -0,0 +1,56 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (89:5,1 [102] Await.cshtml) - \n\n
\n

Basic Asynchronous Expression Test

\n

Basic Asynchronous Expression: + CSharpExpression - (192:9,39 [11] Await.cshtml) + RazorIRToken - (192:9,39 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (203:9,50 [42] Await.cshtml) -

\n

Basic Asynchronous Template: + CSharpExpression - (247:10,38 [11] Await.cshtml) + RazorIRToken - (247:10,38 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (259:10,50 [43] Await.cshtml) -

\n

Basic Asynchronous Statement: + CSharpStatement - (304:11,39 [14] Await.cshtml) - await Foo(); + HtmlContent - (319:11,54 [50] Await.cshtml) -

\n

Basic Asynchronous Statement Nested: + CSharpStatement - (371:12,46 [1] Await.cshtml) - + HtmlContent - (372:12,47 [3] Await.cshtml) - + CSharpExpression - (376:12,51 [11] Await.cshtml) + RazorIRToken - (376:12,51 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (387:12,62 [4] Await.cshtml) - + CSharpStatement - (391:12,66 [1] Await.cshtml) - + HtmlContent - (393:12,68 [54] Await.cshtml) -

\n

Basic Incomplete Asynchronous Statement: + CSharpExpression - (448:13,49 [5] Await.cshtml) + RazorIRToken - (448:13,49 [5] Await.cshtml) - CSharp - await + HtmlContent - (453:13,54 [124] Await.cshtml) -

\n
\n\n
\n

Advanced Asynchronous Expression Test

\n

Advanced Asynchronous Expression: + CSharpExpression - (578:18,42 [15] Await.cshtml) + RazorIRToken - (578:18,42 [15] Await.cshtml) - CSharp - await Foo(1, 2) + HtmlContent - (593:18,57 [56] Await.cshtml) -

\n

Advanced Asynchronous Expression Extended: + CSharpExpression - (650:19,51 [19] Await.cshtml) + RazorIRToken - (650:19,51 [19] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (669:19,70 [45] Await.cshtml) -

\n

Advanced Asynchronous Template: + CSharpExpression - (716:20,41 [22] Await.cshtml) + RazorIRToken - (716:20,41 [22] Await.cshtml) - CSharp - await Foo("bob", true) + HtmlContent - (739:20,64 [46] Await.cshtml) -

\n

Advanced Asynchronous Statement: + CSharpStatement - (787:21,42 [39] Await.cshtml) - await Foo(something, hello: "world"); + HtmlContent - (827:21,82 [55] Await.cshtml) -

\n

Advanced Asynchronous Statement Extended: + CSharpStatement - (884:22,51 [21] Await.cshtml) - await Foo.Bar(1, 2) + HtmlContent - (906:22,73 [53] Await.cshtml) -

\n

Advanced Asynchronous Statement Nested: + CSharpStatement - (961:23,49 [1] Await.cshtml) - + HtmlContent - (962:23,50 [3] Await.cshtml) - + CSharpExpression - (966:23,54 [27] Await.cshtml) + RazorIRToken - (966:23,54 [27] Await.cshtml) - CSharp - await Foo(boolValue: false) + HtmlContent - (993:23,81 [4] Await.cshtml) - + CSharpStatement - (997:23,85 [1] Await.cshtml) - + HtmlContent - (999:23,87 [57] Await.cshtml) -

\n

Advanced Incomplete Asynchronous Statement: + CSharpExpression - (1057:24,52 [19] Await.cshtml) + RazorIRToken - (1057:24,52 [19] Await.cshtml) - CSharp - await ("wrrronggg") + HtmlContent - (1076:24,71 [16] Await.cshtml) -

\n
+ CSharpStatement - (12:0,12 [76] Await.cshtml) - \n public async Task Foo()\n {\n return "Bar";\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt new file mode 100644 index 0000000000..3282f4f27a --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Await_Runtime.ir.txt @@ -0,0 +1,48 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Await_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (91:6,0 [100] Await.cshtml) - \n
\n

Basic Asynchronous Expression Test

\n

Basic Asynchronous Expression: + CSharpExpression - (192:9,39 [11] Await.cshtml) + RazorIRToken - (192:9,39 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (203:9,50 [42] Await.cshtml) -

\n

Basic Asynchronous Template: + CSharpExpression - (247:10,38 [11] Await.cshtml) + RazorIRToken - (247:10,38 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (259:10,50 [43] Await.cshtml) -

\n

Basic Asynchronous Statement: + CSharpStatement - (304:11,39 [14] Await.cshtml) - await Foo(); + HtmlContent - (319:11,54 [50] Await.cshtml) -

\n

Basic Asynchronous Statement Nested: + HtmlContent - (371:12,46 [4] Await.cshtml) - + CSharpExpression - (376:12,51 [11] Await.cshtml) + RazorIRToken - (376:12,51 [11] Await.cshtml) - CSharp - await Foo() + HtmlContent - (387:12,62 [5] Await.cshtml) - + CSharpStatement - (392:12,67 [0] Await.cshtml) - + HtmlContent - (393:12,68 [54] Await.cshtml) -

\n

Basic Incomplete Asynchronous Statement: + CSharpExpression - (448:13,49 [5] Await.cshtml) + RazorIRToken - (448:13,49 [5] Await.cshtml) - CSharp - await + HtmlContent - (453:13,54 [124] Await.cshtml) -

\n
\n\n
\n

Advanced Asynchronous Expression Test

\n

Advanced Asynchronous Expression: + CSharpExpression - (578:18,42 [15] Await.cshtml) + RazorIRToken - (578:18,42 [15] Await.cshtml) - CSharp - await Foo(1, 2) + HtmlContent - (593:18,57 [56] Await.cshtml) -

\n

Advanced Asynchronous Expression Extended: + CSharpExpression - (650:19,51 [19] Await.cshtml) + RazorIRToken - (650:19,51 [19] Await.cshtml) - CSharp - await Foo.Bar(1, 2) + HtmlContent - (669:19,70 [45] Await.cshtml) -

\n

Advanced Asynchronous Template: + CSharpExpression - (716:20,41 [22] Await.cshtml) + RazorIRToken - (716:20,41 [22] Await.cshtml) - CSharp - await Foo("bob", true) + HtmlContent - (739:20,64 [46] Await.cshtml) -

\n

Advanced Asynchronous Statement: + CSharpStatement - (787:21,42 [39] Await.cshtml) - await Foo(something, hello: "world"); + HtmlContent - (827:21,82 [55] Await.cshtml) -

\n

Advanced Asynchronous Statement Extended: + CSharpStatement - (884:22,51 [21] Await.cshtml) - await Foo.Bar(1, 2) + HtmlContent - (906:22,73 [53] Await.cshtml) -

\n

Advanced Asynchronous Statement Nested: + HtmlContent - (961:23,49 [4] Await.cshtml) - + CSharpExpression - (966:23,54 [27] Await.cshtml) + RazorIRToken - (966:23,54 [27] Await.cshtml) - CSharp - await Foo(boolValue: false) + HtmlContent - (993:23,81 [5] Await.cshtml) - + CSharpStatement - (998:23,86 [0] Await.cshtml) - + HtmlContent - (999:23,87 [57] Await.cshtml) -

\n

Advanced Incomplete Asynchronous Statement: + CSharpExpression - (1057:24,52 [19] Await.cshtml) + RazorIRToken - (1057:24,52 [19] Await.cshtml) - CSharp - await ("wrrronggg") + HtmlContent - (1076:24,71 [16] Await.cshtml) -

\n
+ CSharpStatement - (12:0,12 [76] Await.cshtml) - \n public async Task Foo()\n {\n return "Bar";\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports.cshtml b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports.cshtml similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports.cshtml rename to test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports.cshtml diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.codegen.cs new file mode 100644 index 0000000000..5e5c822941 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.codegen.cs @@ -0,0 +1,34 @@ +namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles +{ + #line hidden + using System; + using System.Threading.Tasks; +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml" +using System.Globalization; + +#line default +#line hidden +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml" +using System.ComponentModel; + +#line default +#line hidden +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports1.cshtml" +using System.Text; + +#line default +#line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_DesignTime + { + #pragma warning disable 219 + private void __RazorDirectiveTokenHelpers__() { + } + #pragma warning restore 219 + private static System.Object __o = null; + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + } + #pragma warning restore 1998 + } +} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.ir.txt new file mode 100644 index 0000000000..6db6dbdaef --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + UsingStatement - (31:1,1 [26] BasicImports_Imports0.cshtml) - System.Globalization + UsingStatement - (80:3,1 [27] BasicImports_Imports0.cshtml) - System.ComponentModel + UsingStatement - (23:1,1 [18] BasicImports_Imports1.cshtml) - System.Text + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] BasicImports.cshtml) -

Hi there!

\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_DesignTime.mappings.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports_Imports0.cshtml b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports_Imports0.cshtml rename to test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports_Imports1.cshtml b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports1.cshtml similarity index 100% rename from test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports_Imports1.cshtml rename to test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports1.cshtml diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.codegen.cs new file mode 100644 index 0000000000..5bf8a9a57b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.codegen.cs @@ -0,0 +1,31 @@ +#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d351c0c4dc0afdbf46547fcd87692951d2e4871f" +namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles +{ + #line hidden + using System; + using System.Threading.Tasks; +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml" +using System.Globalization; + +#line default +#line hidden +#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports0.cshtml" +using System.ComponentModel; + +#line default +#line hidden +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Imports1.cshtml" +using System.Text; + +#line default +#line hidden + public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime + { + #pragma warning disable 1998 + public async System.Threading.Tasks.Task ExecuteAsync() + { + WriteLiteral("

Hi there!

\r\n"); + } + #pragma warning restore 1998 + } +} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.ir.txt similarity index 59% rename from test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports.ir.txt rename to test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.ir.txt index d9eff77c60..ee550b72dd 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/ImportsIntegrationTest/BasicImports.ir.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicImports_Runtime.ir.txt @@ -1,11 +1,11 @@ Document - Checksum - - NamespaceDeclaration - - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles UsingStatement - - System UsingStatement - - System.Threading.Tasks UsingStatement - (31:1,1 [28] BasicImports_Imports0.cshtml) - System.Globalization UsingStatement - (80:3,1 [29] BasicImports_Imports0.cshtml) - System.ComponentModel UsingStatement - (23:1,1 [20] BasicImports_Imports1.cshtml) - System.Text - ClassDeclaration - - - - - - RazorMethodDeclaration - - - - - + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicImports_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync HtmlContent - (0:0,0 [18] BasicImports.cshtml) -

Hi there!

\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt new file mode 100644 index 0000000000..4e157a9a92 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_DesignTime.ir.txt @@ -0,0 +1,54 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [18] Blocks.cshtml) - \n int i = 1;\n + HtmlContent - (23:3,0 [2] Blocks.cshtml) - \n + CSharpStatement - (26:4,1 [22] Blocks.cshtml) - while(i <= 10) {\n + HtmlContent - (48:5,4 [19] Blocks.cshtml) -

Hello from C#, # + CSharpExpression - (69:5,25 [1] Blocks.cshtml) + RazorIRToken - (69:5,25 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (71:5,27 [4] Blocks.cshtml) -

+ CSharpStatement - (75:5,31 [16] Blocks.cshtml) - \n i += 1;\n} + HtmlContent - (91:7,1 [4] Blocks.cshtml) - \n\n + CSharpStatement - (96:9,1 [19] Blocks.cshtml) - if(i == 11) {\n + HtmlContent - (115:10,4 [25] Blocks.cshtml) -

We wrote 10 lines!

+ CSharpStatement - (140:10,29 [3] Blocks.cshtml) - \n} + HtmlContent - (143:11,1 [4] Blocks.cshtml) - \n\n + CSharpStatement - (148:13,1 [35] Blocks.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (183:15,8 [36] Blocks.cshtml) -

No really, we wrote 10 lines!

+ CSharpStatement - (219:15,44 [40] Blocks.cshtml) - \n break;\n default:\n + HtmlContent - (259:18,8 [29] Blocks.cshtml) -

Actually, we didn't...

+ CSharpStatement - (288:18,37 [19] Blocks.cshtml) - \n break;\n} + HtmlContent - (307:20,1 [4] Blocks.cshtml) - \n\n + CSharpStatement - (312:22,1 [39] Blocks.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (351:23,4 [25] Blocks.cshtml) -

Hello again from C#, # + CSharpExpression - (378:23,31 [1] Blocks.cshtml) + RazorIRToken - (378:23,31 [1] Blocks.cshtml) - CSharp - j + HtmlContent - (380:23,33 [4] Blocks.cshtml) -

+ CSharpStatement - (384:23,37 [3] Blocks.cshtml) - \n} + HtmlContent - (387:24,1 [4] Blocks.cshtml) - \n\n + CSharpStatement - (392:26,1 [11] Blocks.cshtml) - try {\n + HtmlContent - (403:27,4 [35] Blocks.cshtml) -

That time, we wrote 5 lines!

+ CSharpStatement - (438:27,39 [31] Blocks.cshtml) - \n} catch(Exception ex) {\n + HtmlContent - (469:29,4 [29] Blocks.cshtml) -

Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] Blocks.cshtml) + RazorIRToken - (500:29,35 [10] Blocks.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [4] Blocks.cshtml) -

+ CSharpStatement - (515:29,50 [3] Blocks.cshtml) - \n} + HtmlContent - (518:30,1 [16] Blocks.cshtml) - \n\n

i is now + CSharpExpression - (535:32,13 [1] Blocks.cshtml) + RazorIRToken - (535:32,13 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (536:32,14 [8] Blocks.cshtml) -

\n\n + CSharpStatement - (545:34,1 [26] Blocks.cshtml) - lock(new object()) {\n + HtmlContent - (571:35,4 [47] Blocks.cshtml) -

This block is locked, for your security!

+ CSharpStatement - (618:35,51 [3] Blocks.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt new file mode 100644 index 0000000000..244bbd6356 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Blocks_Runtime.ir.txt @@ -0,0 +1,48 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Blocks_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [18] Blocks.cshtml) - \n int i = 1;\n + HtmlContent - (23:3,0 [2] Blocks.cshtml) - \n + CSharpStatement - (26:4,1 [18] Blocks.cshtml) - while(i <= 10) {\n + HtmlContent - (44:5,0 [23] Blocks.cshtml) -

Hello from C#, # + CSharpExpression - (69:5,25 [1] Blocks.cshtml) + RazorIRToken - (69:5,25 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (71:5,27 [6] Blocks.cshtml) -

\n + CSharpStatement - (77:6,0 [16] Blocks.cshtml) - i += 1;\n}\n + HtmlContent - (93:8,0 [2] Blocks.cshtml) - \n + CSharpStatement - (96:9,1 [15] Blocks.cshtml) - if(i == 11) {\n + HtmlContent - (111:10,0 [31] Blocks.cshtml) -

We wrote 10 lines!

\n + CSharpStatement - (142:11,0 [3] Blocks.cshtml) - }\n + HtmlContent - (145:12,0 [2] Blocks.cshtml) - \n + CSharpStatement - (148:13,1 [27] Blocks.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (175:15,0 [46] Blocks.cshtml) -

No really, we wrote 10 lines!

\n + CSharpStatement - (221:16,0 [30] Blocks.cshtml) - break;\n default:\n + HtmlContent - (251:18,0 [39] Blocks.cshtml) -

Actually, we didn't...

\n + CSharpStatement - (290:19,0 [19] Blocks.cshtml) - break;\n}\n + HtmlContent - (309:21,0 [2] Blocks.cshtml) - \n + CSharpStatement - (312:22,1 [35] Blocks.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (347:23,0 [29] Blocks.cshtml) -

Hello again from C#, # + CSharpExpression - (378:23,31 [1] Blocks.cshtml) + RazorIRToken - (378:23,31 [1] Blocks.cshtml) - CSharp - j + HtmlContent - (380:23,33 [6] Blocks.cshtml) -

\n + CSharpStatement - (386:24,0 [3] Blocks.cshtml) - }\n + HtmlContent - (389:25,0 [2] Blocks.cshtml) - \n + CSharpStatement - (392:26,1 [7] Blocks.cshtml) - try {\n + HtmlContent - (399:27,0 [41] Blocks.cshtml) -

That time, we wrote 5 lines!

\n + CSharpStatement - (440:28,0 [25] Blocks.cshtml) - } catch(Exception ex) {\n + HtmlContent - (465:29,0 [33] Blocks.cshtml) -

Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] Blocks.cshtml) + RazorIRToken - (500:29,35 [10] Blocks.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [6] Blocks.cshtml) -

\n + CSharpStatement - (517:30,0 [3] Blocks.cshtml) - }\n + HtmlContent - (520:31,0 [14] Blocks.cshtml) - \n

i is now + CSharpExpression - (535:32,13 [1] Blocks.cshtml) + RazorIRToken - (535:32,13 [1] Blocks.cshtml) - CSharp - i + HtmlContent - (536:32,14 [8] Blocks.cshtml) -

\n\n + CSharpStatement - (545:34,1 [22] Blocks.cshtml) - lock(new object()) {\n + HtmlContent - (567:35,0 [53] Blocks.cshtml) -

This block is locked, for your security!

\n + CSharpStatement - (620:36,0 [1] Blocks.cshtml) - } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..4b9984ea33 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [0] CodeBlockAtEOF.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..cf3793138f --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockAtEOF_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockAtEOF_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [0] CodeBlockAtEOF.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt new file mode 100644 index 0000000000..49b10b06ed --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_DesignTime.ir.txt @@ -0,0 +1,20 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [17] CodeBlockWithTextElement.cshtml) - \n var a = 1; + HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml) - foo + CSharpStatement - (35:1,31 [22] CodeBlockWithTextElement.cshtml) - \n var b = 1; + HtmlContent - (63:2,23 [4] CodeBlockWithTextElement.cshtml) - bar + CSharpExpression - (69:2,29 [3] CodeBlockWithTextElement.cshtml) + RazorIRToken - (69:2,29 [3] CodeBlockWithTextElement.cshtml) - CSharp - a+b + CSharpStatement - (80:2,40 [2] CodeBlockWithTextElement.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt new file mode 100644 index 0000000000..40e9d95146 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlockWithTextElement_Runtime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlockWithTextElement_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [16] CodeBlockWithTextElement.cshtml) - \n var a = 1; + HtmlContent - (25:1,21 [3] CodeBlockWithTextElement.cshtml) - foo + CSharpStatement - (35:1,31 [19] CodeBlockWithTextElement.cshtml) - \n var b = 1; + HtmlContent - (63:2,23 [4] CodeBlockWithTextElement.cshtml) - bar + CSharpExpression - (69:2,29 [3] CodeBlockWithTextElement.cshtml) + RazorIRToken - (69:2,29 [3] CodeBlockWithTextElement.cshtml) - CSharp - a+b + CSharpStatement - (80:2,40 [2] CodeBlockWithTextElement.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..503efb0152 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [115] CodeBlock.cshtml) - \n for(int i = 1; i <= 10; i++) {\n Output.Write("

Hello from C#, #" + i.ToString() + "

");\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..99285aeace --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/CodeBlock_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_CodeBlock_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [115] CodeBlock.cshtml) - \n for(int i = 1; i <= 10; i++) {\n Output.Write("

Hello from C#, #" + i.ToString() + "

");\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt new file mode 100644 index 0000000000..642b6ae0cb --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_DesignTime.ir.txt @@ -0,0 +1,81 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [48] ConditionalAttributes.cshtml) - \n var ch = true;\n var cls = "bar";\n + HtmlContent - (50:3,4 [16] ConditionalAttributes.cshtml) - + CSharpStatement - (66:3,20 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (72:4,4 [2] ConditionalAttributes.cshtml) -

+ CSharpStatement - (90:4,22 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (96:5,4 [2] ConditionalAttributes.cshtml) -

+ CSharpStatement - (118:5,26 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (124:6,4 [2] ConditionalAttributes.cshtml) -

+ CSharpStatement - (146:6,26 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (152:7,4 [22] ConditionalAttributes.cshtml) - + CSharpStatement - (191:7,43 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (197:8,4 [22] ConditionalAttributes.cshtml) - + CSharpStatement - (240:8,47 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (246:9,4 [2] ConditionalAttributes.cshtml) -

+ CSharpStatement - (285:9,43 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (291:10,4 [18] ConditionalAttributes.cshtml) - + CSharpStatement - (309:10,22 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (315:11,4 [7] ConditionalAttributes.cshtml) - + CSharpStatement - (407:11,96 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (413:12,4 [7] ConditionalAttributes.cshtml) - + CSharpStatement - (521:12,112 [6] ConditionalAttributes.cshtml) - \n + HtmlContent - (527:13,4 [111] ConditionalAttributes.cshtml) - + CSharpStatement - (638:13,115 [2] ConditionalAttributes.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.ir.txt new file mode 100644 index 0000000000..3442575e75 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ConditionalAttributes_Runtime.ir.txt @@ -0,0 +1,55 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ConditionalAttributes_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [44] ConditionalAttributes.cshtml) - \n var ch = true;\n var cls = "bar";\n + HtmlContent - (46:3,0 [28] ConditionalAttributes.cshtml) - \n

\n

\n

\n \n \n

\n \n \n \n \n + CSharpStatement - (640:14,0 [0] ConditionalAttributes.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt new file mode 100644 index 0000000000..6645d7845b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DesignTime_DesignTime.ir.txt @@ -0,0 +1,40 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DesignTime_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (173:11,9 [6] DesignTime.cshtml) - Footer + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [19] DesignTime.cshtml) -

\n + CSharpStatement - (20:1,13 [36] DesignTime.cshtml) - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (56:2,4 [17] DesignTime.cshtml) -

This is item # + CSharpExpression - (74:2,22 [1] DesignTime.cshtml) + RazorIRToken - (74:2,22 [1] DesignTime.cshtml) - CSharp - i + HtmlContent - (75:2,23 [4] DesignTime.cshtml) -

+ CSharpStatement - (79:2,27 [15] DesignTime.cshtml) - \n } + HtmlContent - (94:3,13 [17] DesignTime.cshtml) - \n
\n\n

\n + CSharpExpression - (113:7,2 [12] DesignTime.cshtml) + RazorIRToken - (113:7,2 [12] DesignTime.cshtml) - CSharp - Foo(Bar.Baz) + HtmlContent - (126:7,15 [2] DesignTime.cshtml) - \n + CSharpExpression - (129:8,1 [23] DesignTime.cshtml) + RazorIRToken - (129:8,1 [4] DesignTime.cshtml) - CSharp - Foo( + Template - (134:8,6 [18] DesignTime.cshtml) + HtmlContent - (134:8,6 [7] DesignTime.cshtml) -

Bar + CSharpExpression - (142:8,14 [3] DesignTime.cshtml) + RazorIRToken - (142:8,14 [3] DesignTime.cshtml) - CSharp - baz + HtmlContent - (145:8,17 [8] DesignTime.cshtml) - Biz

+ RazorIRToken - (153:8,25 [1] DesignTime.cshtml) - CSharp - ) + HtmlContent - (154:8,26 [10] DesignTime.cshtml) - \n

\n\n + CSharpStatement - - DefineSection("Footer", async (__razor_section_writer) => { + HtmlContent - (181:11,17 [22] DesignTime.cshtml) - \n

Foo

\n + CSharpExpression - (204:13,5 [3] DesignTime.cshtml) + RazorIRToken - (204:13,5 [3] DesignTime.cshtml) - CSharp - bar + HtmlContent - (207:13,8 [2] DesignTime.cshtml) - \n + CSharpStatement - - }); diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..aa52f92b05 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml) - This is markup\n\n + CSharpStatement - (20:2,2 [0] EmptyCodeBlock.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..62db574aad --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyCodeBlock_Runtime.ir.txt @@ -0,0 +1,9 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyCodeBlock_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyCodeBlock.cshtml) - This is markup\n\n + CSharpStatement - (20:2,2 [0] EmptyCodeBlock.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..e109f0897d --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..1672d1a28c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyExplicitExpression_Runtime.ir.txt @@ -0,0 +1,9 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyExplicitExpression_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyExplicitExpression.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..bf242e74d8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - \n + CSharpExpression - + CSharpStatement - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt new file mode 100644 index 0000000000..f96b6ca973 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpressionInCode_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpressionInCode_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] EmptyImplicitExpressionInCode.cshtml) - \n + CSharpExpression - + CSharpStatement - (9:1,5 [2] EmptyImplicitExpressionInCode.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..488071cd95 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) - This is markup\n\n + CSharpExpression - + HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..b30f9e8e51 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyImplicitExpression_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyImplicitExpression_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] EmptyImplicitExpression.cshtml) - This is markup\n\n + CSharpExpression - + HtmlContent - (19:2,1 [1] EmptyImplicitExpression.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..cded7b916d --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..f186f40886 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionAtEOF_Runtime.ir.txt @@ -0,0 +1,9 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionAtEOF_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ExplicitExpressionAtEOF.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt new file mode 100644 index 0000000000..2ba1df1357 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] ExplicitExpressionWithMarkup.cshtml) -
+ CSharpExpression - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + Template - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + HtmlContent - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) -
diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt new file mode 100644 index 0000000000..9af5d168e8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpressionWithMarkup_Runtime.ir.txt @@ -0,0 +1,11 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpressionWithMarkup_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] ExplicitExpressionWithMarkup.cshtml) -
+ CSharpExpression - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + Template - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) + HtmlContent - (8:0,8 [6] ExplicitExpressionWithMarkup.cshtml) -
diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..26034b4d78 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [8] ExplicitExpression.cshtml) - 1 + 1 = + CSharpExpression - (10:0,10 [3] ExplicitExpression.cshtml) + RazorIRToken - (10:0,10 [3] ExplicitExpression.cshtml) - CSharp - 1+1 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..4233d8785b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExplicitExpression_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExplicitExpression_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [8] ExplicitExpression.cshtml) - 1 + 1 = + CSharpExpression - (10:0,10 [3] ExplicitExpression.cshtml) + RazorIRToken - (10:0,10 [3] ExplicitExpression.cshtml) - CSharp - 1+1 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..acd2c43275 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_DesignTime.ir.txt @@ -0,0 +1,27 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [51] ExpressionsInCode.cshtml) - \n object foo = null;\n string bar = "Foo";\n + HtmlContent - (56:4,0 [2] ExpressionsInCode.cshtml) - \n + CSharpStatement - (59:5,1 [23] ExpressionsInCode.cshtml) - if(foo != null) {\n + CSharpExpression - (83:6,5 [3] ExpressionsInCode.cshtml) + RazorIRToken - (83:6,5 [3] ExpressionsInCode.cshtml) - CSharp - foo + CSharpStatement - (86:6,8 [16] ExpressionsInCode.cshtml) - \n} else {\n + HtmlContent - (102:8,4 [19] ExpressionsInCode.cshtml) -

Foo is Null!

+ CSharpStatement - (121:8,23 [3] ExpressionsInCode.cshtml) - \n} + HtmlContent - (124:9,1 [9] ExpressionsInCode.cshtml) - \n\n

\n + CSharpStatement - (134:12,1 [38] ExpressionsInCode.cshtml) - if(!String.IsNullOrEmpty(bar)) {\n + CSharpExpression - (174:13,6 [21] ExpressionsInCode.cshtml) + RazorIRToken - (174:13,6 [21] ExpressionsInCode.cshtml) - CSharp - bar.Replace("F", "B") + CSharpStatement - (196:13,28 [3] ExpressionsInCode.cshtml) - \n} + HtmlContent - (199:14,1 [6] ExpressionsInCode.cshtml) - \n

diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt new file mode 100644 index 0000000000..415c756ff0 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ExpressionsInCode_Runtime.ir.txt @@ -0,0 +1,21 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ExpressionsInCode_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [51] ExpressionsInCode.cshtml) - \n object foo = null;\n string bar = "Foo";\n + HtmlContent - (56:4,0 [2] ExpressionsInCode.cshtml) - \n + CSharpStatement - (59:5,1 [23] ExpressionsInCode.cshtml) - if(foo != null) {\n + CSharpExpression - (83:6,5 [3] ExpressionsInCode.cshtml) + RazorIRToken - (83:6,5 [3] ExpressionsInCode.cshtml) - CSharp - foo + CSharpStatement - (86:6,8 [12] ExpressionsInCode.cshtml) - \n} else {\n + HtmlContent - (98:8,0 [25] ExpressionsInCode.cshtml) -

Foo is Null!

\n + CSharpStatement - (123:9,0 [3] ExpressionsInCode.cshtml) - }\n + HtmlContent - (126:10,0 [7] ExpressionsInCode.cshtml) - \n

\n + CSharpStatement - (134:12,1 [38] ExpressionsInCode.cshtml) - if(!String.IsNullOrEmpty(bar)) {\n + CSharpExpression - (174:13,6 [21] ExpressionsInCode.cshtml) + RazorIRToken - (174:13,6 [21] ExpressionsInCode.cshtml) - CSharp - bar.Replace("F", "B") + CSharpStatement - (196:13,28 [5] ExpressionsInCode.cshtml) - \n}\n + HtmlContent - (201:15,0 [4] ExpressionsInCode.cshtml) -

diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt new file mode 100644 index 0000000000..f7d710452c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [5] FunctionsBlockMinimal.cshtml) - \n\n + CSharpStatement - (16:2,12 [55] FunctionsBlockMinimal.cshtml) - \nstring foo(string input) {\n return input + "!";\n}\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt new file mode 100644 index 0000000000..bcfde47569 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlockMinimal_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlockMinimal_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [4] FunctionsBlockMinimal.cshtml) - \n\n + CSharpStatement - (4:2,0 [1] FunctionsBlockMinimal.cshtml) - + CSharpStatement - (16:2,12 [55] FunctionsBlockMinimal.cshtml) - \nstring foo(string input) {\n return input + "!";\n}\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..32d14adb1c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (17:2,1 [4] FunctionsBlock.cshtml) - \n\n + HtmlContent - (138:9,1 [28] FunctionsBlock.cshtml) - \n\nHere's a random number: + CSharpExpression - (167:11,25 [11] FunctionsBlock.cshtml) + RazorIRToken - (167:11,25 [11] FunctionsBlock.cshtml) - CSharp - RandomInt() + CSharpStatement - (12:0,12 [4] FunctionsBlock.cshtml) - \n\n + CSharpStatement - (33:4,12 [104] FunctionsBlock.cshtml) - \n Random _rand = new Random();\n private int RandomInt() {\n return _rand.Next();\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt new file mode 100644 index 0000000000..cb7f6c5a74 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/FunctionsBlock_Runtime.ir.txt @@ -0,0 +1,13 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_FunctionsBlock_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (19:3,0 [2] FunctionsBlock.cshtml) - \n + HtmlContent - (140:10,0 [26] FunctionsBlock.cshtml) - \nHere's a random number: + CSharpExpression - (167:11,25 [11] FunctionsBlock.cshtml) + RazorIRToken - (167:11,25 [11] FunctionsBlock.cshtml) - CSharp - RandomInt() + CSharpStatement - (12:0,12 [4] FunctionsBlock.cshtml) - \n\n + CSharpStatement - (33:4,12 [104] FunctionsBlock.cshtml) - \n Random _rand = new Random();\n private int RandomInt() {\n return _rand.Next();\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..c5d358d58d --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] HiddenSpansInCode.cshtml) - \n + CSharpStatement - (9:1,5 [5] HiddenSpansInCode.cshtml) - @Da\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt new file mode 100644 index 0000000000..423722eded --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HiddenSpansInCode_Runtime.ir.txt @@ -0,0 +1,9 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HiddenSpansInCode_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] HiddenSpansInCode.cshtml) - \n + CSharpStatement - (9:1,5 [5] HiddenSpansInCode.cshtml) - @Da\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt new file mode 100644 index 0000000000..9a03df7edd --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Double.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt new file mode 100644 index 0000000000..2b955348b9 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Double_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Double_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Double.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt new file mode 100644 index 0000000000..0d16265367 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Single.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt new file mode 100644 index 0000000000..1ed2e2d604 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/HtmlCommentWithQuote_Single_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_HtmlCommentWithQuote_Single_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [45] HtmlCommentWithQuote_Single.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt new file mode 100644 index 0000000000..48704ef099 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt new file mode 100644 index 0000000000..dd5f61fc3c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpressionAtEOF_Runtime.ir.txt @@ -0,0 +1,9 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpressionAtEOF_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [18] ImplicitExpressionAtEOF.cshtml) - This is markup\n\n + CSharpExpression - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt new file mode 100644 index 0000000000..afc66511fd --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [36] ImplicitExpression.cshtml) - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (37:1,4 [17] ImplicitExpression.cshtml) -

This is item # + CSharpExpression - (55:1,22 [1] ImplicitExpression.cshtml) + RazorIRToken - (55:1,22 [1] ImplicitExpression.cshtml) - CSharp - i + HtmlContent - (56:1,23 [4] ImplicitExpression.cshtml) -

+ CSharpStatement - (60:1,27 [3] ImplicitExpression.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt new file mode 100644 index 0000000000..8f26f8b34b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ImplicitExpression_Runtime.ir.txt @@ -0,0 +1,13 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ImplicitExpression_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [32] ImplicitExpression.cshtml) - for(int i = 1; i <= 10; i++) {\n + HtmlContent - (33:1,0 [21] ImplicitExpression.cshtml) -

This is item # + CSharpExpression - (55:1,22 [1] ImplicitExpression.cshtml) + RazorIRToken - (55:1,22 [1] ImplicitExpression.cshtml) - CSharp - i + HtmlContent - (56:1,23 [6] ImplicitExpression.cshtml) -

\n + CSharpStatement - (62:2,0 [1] ImplicitExpression.cshtml) - } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.ir.txt new file mode 100644 index 0000000000..83bb815eb8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_DesignTime.ir.txt @@ -0,0 +1,18 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inherits_DesignTime - foo.bar>.boz - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (20:2,10 [21] Inherits.cshtml) - foo.bar>.boz + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpExpression - (1:0,1 [5] Inherits.cshtml) + RazorIRToken - (1:0,1 [5] Inherits.cshtml) - CSharp - foo() + HtmlContent - (6:0,6 [4] Inherits.cshtml) - \n\n + HtmlContent - (42:2,32 [5] Inherits.cshtml) - bar\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.ir.txt new file mode 100644 index 0000000000..ec11f10714 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits_Runtime.ir.txt @@ -0,0 +1,11 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inherits_Runtime - foo.bar>.boz - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpExpression - (1:0,1 [5] Inherits.cshtml) + RazorIRToken - (1:0,1 [5] Inherits.cshtml) - CSharp - foo() + HtmlContent - (6:0,6 [4] Inherits.cshtml) - \n\n + HtmlContent - (42:2,32 [5] Inherits.cshtml) - bar\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.ir.txt new file mode 100644 index 0000000000..0682f3649b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_DesignTime.ir.txt @@ -0,0 +1,26 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InlineBlocks_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (9:0,9 [4] InlineBlocks.cshtml) - Link + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - - DefineSection("Link", async (__razor_section_writer) => { + CSharpStatement - - }); + HtmlContent - (13:0,13 [23] InlineBlocks.cshtml) - (string link) {\n
\n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.ir.txt new file mode 100644 index 0000000000..96b3a45755 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InlineBlocks_Runtime.ir.txt @@ -0,0 +1,19 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InlineBlocks_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - - DefineSection("Link", async () => { + CSharpStatement - - }); + HtmlContent - (13:0,13 [23] InlineBlocks.cshtml) - (string link) {\n \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt new file mode 100644 index 0000000000..063cb791e8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_DesignTime.ir.txt @@ -0,0 +1,58 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [32] Instrumented.cshtml) - \n int i = 1;\n var foo = + Template - (35:2,15 [10] Instrumented.cshtml) + HtmlContent - (35:2,15 [10] Instrumented.cshtml) -

Bar

+ CSharpStatement - (45:2,25 [7] Instrumented.cshtml) - ;\n + HtmlContent - (54:3,6 [14] Instrumented.cshtml) - Hello, World\n + CSharpStatement - (68:4,0 [4] Instrumented.cshtml) - + HtmlContent - (72:4,4 [19] Instrumented.cshtml) -

Hello, World

+ CSharpStatement - (91:4,23 [2] Instrumented.cshtml) - \n + HtmlContent - (96:6,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (99:7,1 [22] Instrumented.cshtml) - while(i <= 10) {\n + HtmlContent - (121:8,4 [19] Instrumented.cshtml) -

Hello from C#, # + CSharpExpression - (142:8,25 [1] Instrumented.cshtml) + RazorIRToken - (142:8,25 [1] Instrumented.cshtml) - CSharp - i + HtmlContent - (144:8,27 [4] Instrumented.cshtml) -

+ CSharpStatement - (148:8,31 [16] Instrumented.cshtml) - \n i += 1;\n} + HtmlContent - (164:10,1 [4] Instrumented.cshtml) - \n\n + CSharpStatement - (169:12,1 [19] Instrumented.cshtml) - if(i == 11) {\n + HtmlContent - (188:13,4 [25] Instrumented.cshtml) -

We wrote 10 lines!

+ CSharpStatement - (213:13,29 [3] Instrumented.cshtml) - \n} + HtmlContent - (216:14,1 [4] Instrumented.cshtml) - \n\n + CSharpStatement - (221:16,1 [35] Instrumented.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (256:18,8 [36] Instrumented.cshtml) -

No really, we wrote 10 lines!

+ CSharpStatement - (292:18,44 [40] Instrumented.cshtml) - \n break;\n default:\n + HtmlContent - (332:21,8 [29] Instrumented.cshtml) -

Actually, we didn't...

+ CSharpStatement - (361:21,37 [19] Instrumented.cshtml) - \n break;\n} + HtmlContent - (380:23,1 [4] Instrumented.cshtml) - \n\n + CSharpStatement - (385:25,1 [39] Instrumented.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (424:26,4 [25] Instrumented.cshtml) -

Hello again from C#, # + CSharpExpression - (451:26,31 [1] Instrumented.cshtml) + RazorIRToken - (451:26,31 [1] Instrumented.cshtml) - CSharp - j + HtmlContent - (453:26,33 [4] Instrumented.cshtml) -

+ CSharpStatement - (457:26,37 [3] Instrumented.cshtml) - \n} + HtmlContent - (460:27,1 [4] Instrumented.cshtml) - \n\n + CSharpStatement - (465:29,1 [11] Instrumented.cshtml) - try {\n + HtmlContent - (476:30,4 [35] Instrumented.cshtml) -

That time, we wrote 5 lines!

+ CSharpStatement - (511:30,39 [31] Instrumented.cshtml) - \n} catch(Exception ex) {\n + HtmlContent - (542:32,4 [29] Instrumented.cshtml) -

Oh no! An error occurred: + CSharpExpression - (573:32,35 [10] Instrumented.cshtml) + RazorIRToken - (573:32,35 [10] Instrumented.cshtml) - CSharp - ex.Message + HtmlContent - (584:32,46 [4] Instrumented.cshtml) -

+ CSharpStatement - (588:32,50 [3] Instrumented.cshtml) - \n} + HtmlContent - (591:33,1 [4] Instrumented.cshtml) - \n\n + CSharpStatement - (596:35,1 [26] Instrumented.cshtml) - lock(new object()) {\n + HtmlContent - (622:36,4 [47] Instrumented.cshtml) -

This block is locked, for your security!

+ CSharpStatement - (669:36,51 [3] Instrumented.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt new file mode 100644 index 0000000000..943603fca8 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Instrumented_Runtime.ir.txt @@ -0,0 +1,51 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Instrumented_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [32] Instrumented.cshtml) - \n int i = 1;\n var foo = + Template - (35:2,15 [10] Instrumented.cshtml) + HtmlContent - (35:2,15 [10] Instrumented.cshtml) -

Bar

+ CSharpStatement - (45:2,25 [3] Instrumented.cshtml) - ;\n + HtmlContent - (48:3,0 [4] Instrumented.cshtml) - + HtmlContent - (54:3,6 [39] Instrumented.cshtml) - Hello, World\n

Hello, World

\n + CSharpStatement - (93:5,0 [0] Instrumented.cshtml) - + HtmlContent - (96:6,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (99:7,1 [18] Instrumented.cshtml) - while(i <= 10) {\n + HtmlContent - (117:8,0 [23] Instrumented.cshtml) -

Hello from C#, # + CSharpExpression - (142:8,25 [1] Instrumented.cshtml) + RazorIRToken - (142:8,25 [1] Instrumented.cshtml) - CSharp - i + HtmlContent - (144:8,27 [6] Instrumented.cshtml) -

\n + CSharpStatement - (150:9,0 [16] Instrumented.cshtml) - i += 1;\n}\n + HtmlContent - (166:11,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (169:12,1 [15] Instrumented.cshtml) - if(i == 11) {\n + HtmlContent - (184:13,0 [31] Instrumented.cshtml) -

We wrote 10 lines!

\n + CSharpStatement - (215:14,0 [3] Instrumented.cshtml) - }\n + HtmlContent - (218:15,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (221:16,1 [27] Instrumented.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (248:18,0 [46] Instrumented.cshtml) -

No really, we wrote 10 lines!

\n + CSharpStatement - (294:19,0 [30] Instrumented.cshtml) - break;\n default:\n + HtmlContent - (324:21,0 [39] Instrumented.cshtml) -

Actually, we didn't...

\n + CSharpStatement - (363:22,0 [19] Instrumented.cshtml) - break;\n}\n + HtmlContent - (382:24,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (385:25,1 [35] Instrumented.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (420:26,0 [29] Instrumented.cshtml) -

Hello again from C#, # + CSharpExpression - (451:26,31 [1] Instrumented.cshtml) + RazorIRToken - (451:26,31 [1] Instrumented.cshtml) - CSharp - j + HtmlContent - (453:26,33 [6] Instrumented.cshtml) -

\n + CSharpStatement - (459:27,0 [3] Instrumented.cshtml) - }\n + HtmlContent - (462:28,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (465:29,1 [7] Instrumented.cshtml) - try {\n + HtmlContent - (472:30,0 [41] Instrumented.cshtml) -

That time, we wrote 5 lines!

\n + CSharpStatement - (513:31,0 [25] Instrumented.cshtml) - } catch(Exception ex) {\n + HtmlContent - (538:32,0 [33] Instrumented.cshtml) -

Oh no! An error occurred: + CSharpExpression - (573:32,35 [10] Instrumented.cshtml) + RazorIRToken - (573:32,35 [10] Instrumented.cshtml) - CSharp - ex.Message + HtmlContent - (584:32,46 [6] Instrumented.cshtml) -

\n + CSharpStatement - (590:33,0 [3] Instrumented.cshtml) - }\n + HtmlContent - (593:34,0 [2] Instrumented.cshtml) - \n + CSharpStatement - (596:35,1 [22] Instrumented.cshtml) - lock(new object()) {\n + HtmlContent - (618:36,0 [53] Instrumented.cshtml) -

This block is locked, for your security!

\n + CSharpStatement - (671:37,0 [1] Instrumented.cshtml) - } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt new file mode 100644 index 0000000000..a1a460012a --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [46] MarkupInCodeBlock.cshtml) - \n for(int i = 1; i <= 10; i++) {\n + HtmlContent - (48:2,8 [19] MarkupInCodeBlock.cshtml) -

Hello from C#, # + CSharpExpression - (69:2,29 [12] MarkupInCodeBlock.cshtml) + RazorIRToken - (69:2,29 [12] MarkupInCodeBlock.cshtml) - CSharp - i.ToString() + HtmlContent - (82:2,42 [4] MarkupInCodeBlock.cshtml) -

+ CSharpStatement - (86:2,46 [9] MarkupInCodeBlock.cshtml) - \n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt new file mode 100644 index 0000000000..e9c7602979 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MarkupInCodeBlock_Runtime.ir.txt @@ -0,0 +1,13 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MarkupInCodeBlock_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [38] MarkupInCodeBlock.cshtml) - \n for(int i = 1; i <= 10; i++) {\n + HtmlContent - (40:2,0 [27] MarkupInCodeBlock.cshtml) -

Hello from C#, # + CSharpExpression - (69:2,29 [12] MarkupInCodeBlock.cshtml) + RazorIRToken - (69:2,29 [12] MarkupInCodeBlock.cshtml) - CSharp - i.ToString() + HtmlContent - (82:2,42 [6] MarkupInCodeBlock.cshtml) -

\n + CSharpStatement - (88:3,0 [7] MarkupInCodeBlock.cshtml) - }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt new file mode 100644 index 0000000000..ab48043faa --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_DesignTime.ir.txt @@ -0,0 +1,21 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] NestedCSharp.cshtml) - \n + CSharpStatement - (9:1,5 [53] NestedCSharp.cshtml) - foreach (var result in (dynamic)Url)\n {\n + HtmlContent - (62:3,8 [19] NestedCSharp.cshtml) -
\n + CSharpExpression - (82:4,13 [16] NestedCSharp.cshtml) + RazorIRToken - (82:4,13 [16] NestedCSharp.cshtml) - CSharp - result.SomeValue + HtmlContent - (98:4,29 [17] NestedCSharp.cshtml) - .\n
+ CSharpStatement - (115:5,14 [7] NestedCSharp.cshtml) - \n } + CSharpStatement - (122:6,5 [2] NestedCSharp.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt new file mode 100644 index 0000000000..02593d51d0 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCSharp_Runtime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCSharp_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] NestedCSharp.cshtml) - \n + CSharpStatement - (9:1,5 [45] NestedCSharp.cshtml) - foreach (var result in (dynamic)Url)\n {\n + HtmlContent - (54:3,0 [27] NestedCSharp.cshtml) -
\n + CSharpExpression - (82:4,13 [16] NestedCSharp.cshtml) + RazorIRToken - (82:4,13 [16] NestedCSharp.cshtml) - CSharp - result.SomeValue + HtmlContent - (98:4,29 [19] NestedCSharp.cshtml) - .\n
\n + CSharpStatement - (117:6,0 [5] NestedCSharp.cshtml) - } + CSharpStatement - (122:6,5 [2] NestedCSharp.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt new file mode 100644 index 0000000000..f355ae730c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [15] NestedCodeBlocks.cshtml) - if(foo) {\n + CSharpStatement - (17:1,5 [16] NestedCodeBlocks.cshtml) - if(bar) {\n } + CSharpStatement - (33:2,5 [3] NestedCodeBlocks.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt new file mode 100644 index 0000000000..46c135c2bc --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedCodeBlocks_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedCodeBlocks_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [15] NestedCodeBlocks.cshtml) - if(foo) {\n + CSharpStatement - (17:1,5 [16] NestedCodeBlocks.cshtml) - if(bar) {\n } + CSharpStatement - (33:2,5 [3] NestedCodeBlocks.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt new file mode 100644 index 0000000000..4e5cc65121 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_DesignTime.ir.txt @@ -0,0 +1,55 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [18] NoLinePragmas.cshtml) - \n int i = 1;\n + HtmlContent - (23:3,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (26:4,1 [22] NoLinePragmas.cshtml) - while(i <= 10) {\n + HtmlContent - (48:5,4 [19] NoLinePragmas.cshtml) -

Hello from C#, # + CSharpExpression - (69:5,25 [1] NoLinePragmas.cshtml) + RazorIRToken - (69:5,25 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (71:5,27 [4] NoLinePragmas.cshtml) -

+ CSharpStatement - (75:5,31 [16] NoLinePragmas.cshtml) - \n i += 1;\n} + HtmlContent - (91:7,1 [4] NoLinePragmas.cshtml) - \n\n + CSharpStatement - (96:9,1 [19] NoLinePragmas.cshtml) - if(i == 11) {\n + HtmlContent - (115:10,4 [25] NoLinePragmas.cshtml) -

We wrote 10 lines!

+ CSharpStatement - (140:10,29 [3] NoLinePragmas.cshtml) - \n} + HtmlContent - (143:11,1 [4] NoLinePragmas.cshtml) - \n\n + CSharpStatement - (148:13,1 [35] NoLinePragmas.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (183:15,8 [36] NoLinePragmas.cshtml) -

No really, we wrote 10 lines!

+ CSharpStatement - (219:15,44 [40] NoLinePragmas.cshtml) - \n break;\n default:\n + HtmlContent - (259:18,8 [29] NoLinePragmas.cshtml) -

Actually, we didn't...

+ CSharpStatement - (288:18,37 [19] NoLinePragmas.cshtml) - \n break;\n} + HtmlContent - (307:20,1 [4] NoLinePragmas.cshtml) - \n\n + CSharpStatement - (312:22,1 [39] NoLinePragmas.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (351:23,4 [25] NoLinePragmas.cshtml) -

Hello again from C#, # + CSharpExpression - (378:23,31 [1] NoLinePragmas.cshtml) + RazorIRToken - (378:23,31 [1] NoLinePragmas.cshtml) - CSharp - j + HtmlContent - (380:23,33 [4] NoLinePragmas.cshtml) -

+ CSharpStatement - (384:23,37 [3] NoLinePragmas.cshtml) - \n} + HtmlContent - (387:24,1 [4] NoLinePragmas.cshtml) - \n\n + CSharpStatement - (392:26,1 [11] NoLinePragmas.cshtml) - try {\n + HtmlContent - (403:27,4 [35] NoLinePragmas.cshtml) -

That time, we wrote 5 lines!

+ CSharpStatement - (438:27,39 [31] NoLinePragmas.cshtml) - \n} catch(Exception ex) {\n + HtmlContent - (469:29,4 [29] NoLinePragmas.cshtml) -

Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] NoLinePragmas.cshtml) + RazorIRToken - (500:29,35 [10] NoLinePragmas.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [4] NoLinePragmas.cshtml) -

+ CSharpStatement - (515:29,50 [7] NoLinePragmas.cshtml) - \n}\n\n + CSharpStatement - (556:32,34 [0] NoLinePragmas.cshtml) - + HtmlContent - (556:32,34 [14] NoLinePragmas.cshtml) - \n

i is now + CSharpExpression - (571:33,13 [1] NoLinePragmas.cshtml) + RazorIRToken - (571:33,13 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (572:33,14 [8] NoLinePragmas.cshtml) -

\n\n + CSharpStatement - (581:35,1 [26] NoLinePragmas.cshtml) - lock(new object()) {\n + HtmlContent - (607:36,4 [47] NoLinePragmas.cshtml) -

This block is locked, for your security!

+ CSharpStatement - (654:36,51 [3] NoLinePragmas.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt new file mode 100644 index 0000000000..f81a404a97 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NoLinePragmas_Runtime.ir.txt @@ -0,0 +1,49 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NoLinePragmas_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [18] NoLinePragmas.cshtml) - \n int i = 1;\n + HtmlContent - (23:3,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (26:4,1 [18] NoLinePragmas.cshtml) - while(i <= 10) {\n + HtmlContent - (44:5,0 [23] NoLinePragmas.cshtml) -

Hello from C#, # + CSharpExpression - (69:5,25 [1] NoLinePragmas.cshtml) + RazorIRToken - (69:5,25 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (71:5,27 [6] NoLinePragmas.cshtml) -

\n + CSharpStatement - (77:6,0 [16] NoLinePragmas.cshtml) - i += 1;\n}\n + HtmlContent - (93:8,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (96:9,1 [15] NoLinePragmas.cshtml) - if(i == 11) {\n + HtmlContent - (111:10,0 [31] NoLinePragmas.cshtml) -

We wrote 10 lines!

\n + CSharpStatement - (142:11,0 [3] NoLinePragmas.cshtml) - }\n + HtmlContent - (145:12,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (148:13,1 [27] NoLinePragmas.cshtml) - switch(i) {\n case 11:\n + HtmlContent - (175:15,0 [46] NoLinePragmas.cshtml) -

No really, we wrote 10 lines!

\n + CSharpStatement - (221:16,0 [30] NoLinePragmas.cshtml) - break;\n default:\n + HtmlContent - (251:18,0 [39] NoLinePragmas.cshtml) -

Actually, we didn't...

\n + CSharpStatement - (290:19,0 [19] NoLinePragmas.cshtml) - break;\n}\n + HtmlContent - (309:21,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (312:22,1 [35] NoLinePragmas.cshtml) - for(int j = 1; j <= 10; j += 2) {\n + HtmlContent - (347:23,0 [29] NoLinePragmas.cshtml) -

Hello again from C#, # + CSharpExpression - (378:23,31 [1] NoLinePragmas.cshtml) + RazorIRToken - (378:23,31 [1] NoLinePragmas.cshtml) - CSharp - j + HtmlContent - (380:23,33 [6] NoLinePragmas.cshtml) -

\n + CSharpStatement - (386:24,0 [3] NoLinePragmas.cshtml) - }\n + HtmlContent - (389:25,0 [2] NoLinePragmas.cshtml) - \n + CSharpStatement - (392:26,1 [7] NoLinePragmas.cshtml) - try {\n + HtmlContent - (399:27,0 [41] NoLinePragmas.cshtml) -

That time, we wrote 5 lines!

\n + CSharpStatement - (440:28,0 [25] NoLinePragmas.cshtml) - } catch(Exception ex) {\n + HtmlContent - (465:29,0 [33] NoLinePragmas.cshtml) -

Oh no! An error occurred: + CSharpExpression - (500:29,35 [10] NoLinePragmas.cshtml) + RazorIRToken - (500:29,35 [10] NoLinePragmas.cshtml) - CSharp - ex.Message + HtmlContent - (511:29,46 [6] NoLinePragmas.cshtml) -

\n + CSharpStatement - (517:30,0 [5] NoLinePragmas.cshtml) - }\n\n + CSharpStatement - (556:32,34 [2] NoLinePragmas.cshtml) - \n + HtmlContent - (558:33,0 [12] NoLinePragmas.cshtml) -

i is now + CSharpExpression - (571:33,13 [1] NoLinePragmas.cshtml) + RazorIRToken - (571:33,13 [1] NoLinePragmas.cshtml) - CSharp - i + HtmlContent - (572:33,14 [8] NoLinePragmas.cshtml) -

\n\n + CSharpStatement - (581:35,1 [22] NoLinePragmas.cshtml) - lock(new object()) {\n + HtmlContent - (603:36,0 [53] NoLinePragmas.cshtml) -

This block is locked, for your security!

\n + CSharpStatement - (656:37,0 [1] NoLinePragmas.cshtml) - } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt new file mode 100644 index 0000000000..e871619c52 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_DesignTime.ir.txt @@ -0,0 +1,38 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (9:1,5 [13] NullConditionalExpressions.cshtml) + RazorIRToken - (9:1,5 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + CSharpStatement - (22:1,18 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (29:2,5 [22] NullConditionalExpressions.cshtml) + RazorIRToken - (29:2,5 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + CSharpStatement - (51:2,27 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (58:3,5 [26] NullConditionalExpressions.cshtml) + RazorIRToken - (58:3,5 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + CSharpStatement - (84:3,31 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (91:4,5 [41] NullConditionalExpressions.cshtml) + RazorIRToken - (91:4,5 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] + CSharpStatement - (132:4,46 [2] NullConditionalExpressions.cshtml) - \n + HtmlContent - (137:6,0 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (140:7,1 [13] NullConditionalExpressions.cshtml) + RazorIRToken - (140:7,1 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + HtmlContent - (153:7,14 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (156:8,1 [22] NullConditionalExpressions.cshtml) + RazorIRToken - (156:8,1 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + HtmlContent - (178:8,23 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (181:9,1 [26] NullConditionalExpressions.cshtml) + RazorIRToken - (181:9,1 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + HtmlContent - (207:9,27 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (210:10,1 [41] NullConditionalExpressions.cshtml) + RazorIRToken - (210:10,1 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt new file mode 100644 index 0000000000..efdb734e26 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NullConditionalExpressions_Runtime.ir.txt @@ -0,0 +1,32 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NullConditionalExpressions_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (9:1,5 [13] NullConditionalExpressions.cshtml) + RazorIRToken - (9:1,5 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + CSharpStatement - (22:1,18 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (29:2,5 [22] NullConditionalExpressions.cshtml) + RazorIRToken - (29:2,5 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + CSharpStatement - (51:2,27 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (58:3,5 [26] NullConditionalExpressions.cshtml) + RazorIRToken - (58:3,5 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + CSharpStatement - (84:3,31 [6] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (91:4,5 [41] NullConditionalExpressions.cshtml) + RazorIRToken - (91:4,5 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] + CSharpStatement - (132:4,46 [2] NullConditionalExpressions.cshtml) - \n + HtmlContent - (137:6,0 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (140:7,1 [13] NullConditionalExpressions.cshtml) + RazorIRToken - (140:7,1 [13] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Data + HtmlContent - (153:7,14 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (156:8,1 [22] NullConditionalExpressions.cshtml) + RazorIRToken - (156:8,1 [22] NullConditionalExpressions.cshtml) - CSharp - ViewBag.IntIndexer?[0] + HtmlContent - (178:8,23 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (181:9,1 [26] NullConditionalExpressions.cshtml) + RazorIRToken - (181:9,1 [26] NullConditionalExpressions.cshtml) - CSharp - ViewBag.StrIndexer?["key"] + HtmlContent - (207:9,27 [2] NullConditionalExpressions.cshtml) - \n + CSharpExpression - (210:10,1 [41] NullConditionalExpressions.cshtml) + RazorIRToken - (210:10,1 [41] NullConditionalExpressions.cshtml) - CSharp - ViewBag?.Method(Value?[23]?.More)?["key"] diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt new file mode 100644 index 0000000000..eaef5fcb2f --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_DesignTime.ir.txt @@ -0,0 +1,19 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [16] OpenedIf.cshtml) - \n\n + CSharpStatement - (17:2,1 [14] OpenedIf.cshtml) - if (true) { \n + HtmlContent - (31:3,0 [7] OpenedIf.cshtml) - + CSharpStatement - (38:3,7 [2] OpenedIf.cshtml) - \n + HtmlContent - (40:4,0 [7] OpenedIf.cshtml) - + CSharpStatement - (47:4,7 [0] OpenedIf.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt new file mode 100644 index 0000000000..9c6047c6f1 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/OpenedIf_Runtime.ir.txt @@ -0,0 +1,11 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_OpenedIf_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [16] OpenedIf.cshtml) - \n\n + CSharpStatement - (17:2,1 [14] OpenedIf.cshtml) - if (true) { \n + HtmlContent - (31:3,0 [16] OpenedIf.cshtml) - \n + CSharpStatement - (47:4,7 [0] OpenedIf.cshtml) - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt new file mode 100644 index 0000000000..0fd06bc136 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.ir.txt @@ -0,0 +1,14 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [31] ParserError.cshtml) - \n/*\nint i =10;\nint j =20;\n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt new file mode 100644 index 0000000000..ffdbfae972 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.ir.txt @@ -0,0 +1,8 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ParserError_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [31] ParserError.cshtml) - \n/*\nint i =10;\nint j =20;\n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt new file mode 100644 index 0000000000..75b7b3474d --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_DesignTime.ir.txt @@ -0,0 +1,28 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (36:0,36 [17] RazorComments.cshtml) - \n

This should + HtmlContent - (62:1,24 [17] RazorComments.cshtml) - be shown

\n\n + CSharpStatement - (81:3,2 [6] RazorComments.cshtml) - \n + CSharpStatement - (122:4,39 [22] RazorComments.cshtml) - \n Exception foo = + CSharpStatement - (173:5,49 [58] RazorComments.cshtml) - null;\n if(foo != null) {\n throw foo;\n }\n + HtmlContent - (234:10,0 [2] RazorComments.cshtml) - \n + CSharpStatement - (238:11,2 [24] RazorComments.cshtml) - var bar = "@* bar *@"; + HtmlContent - (265:12,0 [44] RazorComments.cshtml) -

But this should show the comment syntax: + CSharpExpression - (310:12,45 [3] RazorComments.cshtml) + RazorIRToken - (310:12,45 [3] RazorComments.cshtml) - CSharp - bar + HtmlContent - (313:12,48 [8] RazorComments.cshtml) -

\n\n + CSharpExpression - (323:14,2 [2] RazorComments.cshtml) + RazorIRToken - (323:14,2 [1] RazorComments.cshtml) - CSharp - a + RazorIRToken - (328:14,7 [1] RazorComments.cshtml) - CSharp - b + HtmlContent - (330:14,9 [2] RazorComments.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt new file mode 100644 index 0000000000..8c8dbce5b9 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorComments_Runtime.ir.txt @@ -0,0 +1,22 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorComments_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (36:0,36 [17] RazorComments.cshtml) - \n

This should + HtmlContent - (62:1,24 [17] RazorComments.cshtml) - be shown

\n\n + CSharpStatement - (81:3,2 [6] RazorComments.cshtml) - \n + CSharpStatement - (122:4,39 [22] RazorComments.cshtml) - \n Exception foo = + CSharpStatement - (173:5,49 [58] RazorComments.cshtml) - null;\n if(foo != null) {\n throw foo;\n }\n + HtmlContent - (234:10,0 [2] RazorComments.cshtml) - \n + CSharpStatement - (238:11,2 [24] RazorComments.cshtml) - var bar = "@* bar *@"; + HtmlContent - (265:12,0 [44] RazorComments.cshtml) -

But this should show the comment syntax: + CSharpExpression - (310:12,45 [3] RazorComments.cshtml) + RazorIRToken - (310:12,45 [3] RazorComments.cshtml) - CSharp - bar + HtmlContent - (313:12,48 [8] RazorComments.cshtml) -

\n\n + CSharpExpression - (323:14,2 [2] RazorComments.cshtml) + RazorIRToken - (323:14,2 [1] RazorComments.cshtml) - CSharp - a + RazorIRToken - (328:14,7 [1] RazorComments.cshtml) - CSharp - b + HtmlContent - (330:14,9 [2] RazorComments.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt new file mode 100644 index 0000000000..eda8fc329d --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RemoveTagHelperDirective_DesignTime.ir.txt @@ -0,0 +1,15 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RemoveTagHelperDirective_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (17:0,17 [15] RemoveTagHelperDirective.cshtml) - *, TestAssembly + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (32:0,32 [2] RemoveTagHelperDirective.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt new file mode 100644 index 0000000000..c0a6faaa1b --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_DesignTime.ir.txt @@ -0,0 +1,42 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (89:6,9 [8] Sections.cshtml) - Section2 + DirectiveToken - (172:10,9 [8] Sections.cshtml) - Section1 + DirectiveToken - (235:14,9 [15] Sections.cshtml) - NestedDelegates + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [44] Sections.cshtml) - \n Layout = "_SectionTestLayout.cshtml"\n + HtmlContent - (49:3,0 [31] Sections.cshtml) - \n
This is in the Body>\n\n + CSharpStatement - - DefineSection("Section2", async (__razor_section_writer) => { + HtmlContent - (99:6,19 [10] Sections.cshtml) - \n
This is in Section 2
\n + CSharpStatement - - }); + HtmlContent - (159:8,1 [4] Sections.cshtml) - \n\n + CSharpStatement - - DefineSection("Section1", async (__razor_section_writer) => { + HtmlContent - (182:10,19 [39] Sections.cshtml) - \n
This is in Section 1
\n + CSharpStatement - - }); + HtmlContent - (222:12,1 [4] Sections.cshtml) - \n\n + CSharpStatement - - DefineSection("NestedDelegates", async (__razor_section_writer) => { + HtmlContent - (252:14,26 [6] Sections.cshtml) - \n + CSharpStatement - (260:15,6 [27] Sections.cshtml) - Func f = + Template - (288:15,34 [17] Sections.cshtml) + HtmlContent - (288:15,34 [6] Sections.cshtml) - + CSharpExpression - (295:15,41 [4] Sections.cshtml) + RazorIRToken - (295:15,41 [4] Sections.cshtml) - CSharp - item + HtmlContent - (299:15,45 [7] Sections.cshtml) - + CSharpStatement - (306:15,52 [2] Sections.cshtml) - ; + CSharpStatement - - }); diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt new file mode 100644 index 0000000000..93b8d9caa5 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections_Runtime.ir.txt @@ -0,0 +1,34 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [44] Sections.cshtml) - \n Layout = "_SectionTestLayout.cshtml"\n + HtmlContent - (49:3,0 [31] Sections.cshtml) - \n
This is in the Body>\n\n + CSharpStatement - - DefineSection("Section2", async () => { + HtmlContent - (99:6,19 [10] Sections.cshtml) - \n
This is in Section 2
\n + CSharpStatement - - }); + HtmlContent - (161:9,0 [2] Sections.cshtml) - \n + CSharpStatement - - DefineSection("Section1", async () => { + HtmlContent - (182:10,19 [39] Sections.cshtml) - \n
This is in Section 1
\n + CSharpStatement - - }); + HtmlContent - (224:13,0 [2] Sections.cshtml) - \n + CSharpStatement - - DefineSection("NestedDelegates", async () => { + HtmlContent - (252:14,26 [2] Sections.cshtml) - \n + CSharpStatement - (254:15,0 [4] Sections.cshtml) - + CSharpStatement - (260:15,6 [27] Sections.cshtml) - Func f = + Template - (288:15,34 [17] Sections.cshtml) + HtmlContent - (288:15,34 [6] Sections.cshtml) - + CSharpExpression - (295:15,41 [4] Sections.cshtml) + RazorIRToken - (295:15,41 [4] Sections.cshtml) - CSharp - item + HtmlContent - (299:15,45 [7] Sections.cshtml) - + CSharpStatement - (306:15,52 [2] Sections.cshtml) - ; + CSharpStatement - - }); diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt new file mode 100644 index 0000000000..b46d220c4c --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_DesignTime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [15] SimpleUnspacedIf.cshtml) - if (true)\n{\n + HtmlContent - (16:2,1 [11] SimpleUnspacedIf.cshtml) -
+ CSharpStatement - (27:2,12 [3] SimpleUnspacedIf.cshtml) - \n} diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt new file mode 100644 index 0000000000..c1681734d9 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SimpleUnspacedIf_Runtime.ir.txt @@ -0,0 +1,10 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleUnspacedIf_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (1:0,1 [14] SimpleUnspacedIf.cshtml) - if (true)\n{\n + HtmlContent - (15:2,0 [14] SimpleUnspacedIf.cshtml) -
\n + CSharpStatement - (29:3,0 [1] SimpleUnspacedIf.cshtml) - } diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt new file mode 100644 index 0000000000..b6b125bd66 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_DesignTime.ir.txt @@ -0,0 +1,24 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + DirectiveToken - (2022:85,9 [21] StringLiterals.cshtml) - WriteLiteralsToInHere + DirectiveToken - (5701:205,9 [25] StringLiterals.cshtml) - WriteLiteralsToInHereAlso + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2013] StringLiterals.cshtml) -

This is line 1

\n

This is line 2

\n

This is line 3

\n

This is line 4

\n

This is line 5

\n

This is line 6

\n

This is line 7

\n

This is line 8

\n

This is line 9

\n

This is line 10

\n

This is line 11

\n

This is line 12

\n

This is line 13

\n

This is line 14

\n

This is line 15

\n

This is line 16

\n

This is line 17

\n

This is line 18

\n

This is line 19

\n

This is line 20

\n

This is line 21

\n

This is line 22

\n

This is line 23

\n

This is line 24

\n

This is line 25

\n

This is line 26

\n

This is line 27

\n

This is line 28

\n

This is line 29

\n

This is line 30

\n

This is line 31

\n

This is line 32

\n

This is line 33

\n

This is line 34

\n

This is line 35

\n

This is line 36

\n

This is line 37

\n

This is line 38

\n

This is line 39

\n

This is line 40

\n

This is line 41

\n

This is line 42

\n

This is line 43

\n

This is line 44

\n

This is line 45

\n

This is line 46

\n

This is line 47

\n

This is line 48

\n

This is line 49

\n

This is line 50

\n

This is line 51

\n

This is line 52

\n

This is line 53

\n

This is line 54

\n

This is line 55

\n

This is line 56

\n

This is line 57

\n

This is line 58

\n

This is line 59

\n

This is line 60

\n

This is line 61

\n

This is line 62

\n

This is line 63

\n

This is line 64

\n

This is line 65

\n

This is line 66

\n

This is line 67

\n

This is line 68

\n

This is line 69

\n

This is line 70

\n

This is line 71

\n

This is line 72

\n

This is line 73

\n

This is line 74

\n

This is line 75

\n

This is line 76

\n

This is line 77

\n

This is line 78

\n

This is line 79

\n

This is line 80

\n

This is line 81

\n

This is line 82

\n

This is line 83

\n

This is line 84


\n\n + CSharpStatement - - DefineSection("WriteLiteralsToInHere", async (__razor_section_writer) => { + HtmlContent - (2045:85,32 [2618] StringLiterals.cshtml) - \n

This is line 1 nested

\n

This is line 2 nested

\n

This is line 3 nested

\n

This is line 4 nested

\n

This is line 5 nested

\n

This is line 6 nested

\n

This is line 7 nested

\n

This is line 8 nested

\n

This is line 9 nested

\n

This is line 10 nested

\n

This is line 11 nested

\n

This is line 12 nested

\n

This is line 13 nested

\n

This is line 14 nested

\n

This is line 15 nested

\n

This is line 16 nested

\n

This is line 17 nested

\n

This is line 18 nested

\n

This is line 19 nested

\n

This is line 20 nested

\n

This is line 21 nested

\n

This is line 22 nested

\n

This is line 23 nested

\n

This is line 24 nested

\n

This is line 25 nested

\n

This is line 26 nested

\n

This is line 27 nested

\n

This is line 28 nested

\n

This is line 29 nested

\n

This is line 30 nested

\n

This is line 31 nested

\n

This is line 32 nested

\n

This is line 33 nested

\n

This is line 34 nested

\n

This is line 35 nested

\n

This is line 36 nested

\n

This is line 37 nested

\n

This is line 38 nested

\n

This is line 39 nested

\n

This is line 40 nested

\n

This is line 41 nested

\n

This is line 42 nested

\n

This is line 43 nested

\n

This is line 44 nested

\n

This is line 45 nested

\n

This is line 46 nested

\n

This is line 47 nested

\n

This is line 48 nested

\n

This is line 49 nested

\n

This is line 50 nested

\n

This is line 51 nested

\n

This is line 52 nested

\n

This is line 53 nested

\n

This is line 54 nested

\n

This is line 55 nested

\n

This is line 56 nested

\n

This is line 57 nested

\n

This is line 58 nested

\n

This is line 59 nested

\n

This is line 60 nested

\n

This is line 61 nested

\n

This is line 62 nested

\n

This is line 63 nested

\n

This is line 64 nested

\n

This is line 65 nested

\n

This is line 66 nested

\n

This is line 67 nested

\n

This is line 68 nested

\n

This is line 69 nested

\n

This is line 70 nested

\n

This is line 71 nested

\n

This is line 72 nested

\n

This is line 73 nested

\n

This is line 74 nested

\n

This is line 75 nested

\n + CSharpStatement - - }); + HtmlContent - (4664:161,1 [1028] StringLiterals.cshtml) - \n

This is line 1

\n

This is line 2

\n

This is line 3

\n

This is line 4

\n

This is line 5

\n

This is line 6

\n

This is line 7

\n

This is line 8

\n

This is line 9

\n

This is line 10

\n

This is line 11

\n

This is line 12

\n

This is line 13

\n

This is line 14

\n

This is line 15

\n

This is line 16

\n

This is line 17

\n

This is line 18

\n

This is line 19

\n

This is line 20

\n

This is line 21

\n

This is line 22

\n

This is line 23

\n

This is line 24

\n

This is line 25

\n

This is line 26

\n

This is line 27

\n

This is line 28

\n

This is line 29

\n

This is line 30

\n

This is line 31

\n

This is line 32

\n

This is line 33

\n

This is line 34

\n

This is line 35

\n

This is line 36

\n

This is line 37

\n

This is line 38

\n

This is line 39

\n

This is line 40

\n

This is line 41

\n

This is line 42

\n

This is line 43

hi!\n + CSharpStatement - - DefineSection("WriteLiteralsToInHereAlso", async (__razor_section_writer) => { + HtmlContent - (5728:205,36 [1023] StringLiterals.cshtml) - \n

This is line 1 nested

\n

This is line 2 nested

\n

This is line 3 nested

\n

This is line 4 nested

\n

This is line 5 nested

\n

This is line 6 nested

\n

This is line 7 nested

\n

This is line 8 nested

\n

This is line 9 nested

\n

This is line 10 nested

\n

This is line 11 nested

\n

This is line 12 nested

\n

This is line 13 nested

\n

This is line 14 nested

\n

This is line 15 nested

\n

This is line 16 nested

\n

This is line 17 nested

\n

This is line 18 nested

\n

This is line 19 nested

\n

This is line 20 nested

\n

This is line 21 nested

\n

This is line 22 nested

\n

This is line 23 nested

\n

This is line 24 nested

\n

This is line 25 nested

\n

This is line 26 nested

\n

This is line 27 nested

\n

This is line 28 nested

\n

This is line 29 nested

\n

30

\n + CSharpStatement - - }); + HtmlContent - (6752:236,1 [1] StringLiterals.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt new file mode 100644 index 0000000000..a99c78a10f --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/StringLiterals_Runtime.ir.txt @@ -0,0 +1,16 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_StringLiterals_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (0:0,0 [2013] StringLiterals.cshtml) -

This is line 1

\n

This is line 2

\n

This is line 3

\n

This is line 4

\n

This is line 5

\n

This is line 6

\n

This is line 7

\n

This is line 8

\n

This is line 9

\n

This is line 10

\n

This is line 11

\n

This is line 12

\n

This is line 13

\n

This is line 14

\n

This is line 15

\n

This is line 16

\n

This is line 17

\n

This is line 18

\n

This is line 19

\n

This is line 20

\n

This is line 21

\n

This is line 22

\n

This is line 23

\n

This is line 24

\n

This is line 25

\n

This is line 26

\n

This is line 27

\n

This is line 28

\n

This is line 29

\n

This is line 30

\n

This is line 31

\n

This is line 32

\n

This is line 33

\n

This is line 34

\n

This is line 35

\n

This is line 36

\n

This is line 37

\n

This is line 38

\n

This is line 39

\n

This is line 40

\n

This is line 41

\n

This is line 42

\n

This is line 43

\n

This is line 44

\n

This is line 45

\n

This is line 46

\n

This is line 47

\n

This is line 48

\n

This is line 49

\n

This is line 50

\n

This is line 51

\n

This is line 52

\n

This is line 53

\n

This is line 54

\n

This is line 55

\n

This is line 56

\n

This is line 57

\n

This is line 58

\n

This is line 59

\n

This is line 60

\n

This is line 61

\n

This is line 62

\n

This is line 63

\n

This is line 64

\n

This is line 65

\n

This is line 66

\n

This is line 67

\n

This is line 68

\n

This is line 69

\n

This is line 70

\n

This is line 71

\n

This is line 72

\n

This is line 73

\n

This is line 74

\n

This is line 75

\n

This is line 76

\n

This is line 77

\n

This is line 78

\n

This is line 79

\n

This is line 80

\n

This is line 81

\n

This is line 82

\n

This is line 83

\n

This is line 84


\n\n + CSharpStatement - - DefineSection("WriteLiteralsToInHere", async () => { + HtmlContent - (2045:85,32 [2618] StringLiterals.cshtml) - \n

This is line 1 nested

\n

This is line 2 nested

\n

This is line 3 nested

\n

This is line 4 nested

\n

This is line 5 nested

\n

This is line 6 nested

\n

This is line 7 nested

\n

This is line 8 nested

\n

This is line 9 nested

\n

This is line 10 nested

\n

This is line 11 nested

\n

This is line 12 nested

\n

This is line 13 nested

\n

This is line 14 nested

\n

This is line 15 nested

\n

This is line 16 nested

\n

This is line 17 nested

\n

This is line 18 nested

\n

This is line 19 nested

\n

This is line 20 nested

\n

This is line 21 nested

\n

This is line 22 nested

\n

This is line 23 nested

\n

This is line 24 nested

\n

This is line 25 nested

\n

This is line 26 nested

\n

This is line 27 nested

\n

This is line 28 nested

\n

This is line 29 nested

\n

This is line 30 nested

\n

This is line 31 nested

\n

This is line 32 nested

\n

This is line 33 nested

\n

This is line 34 nested

\n

This is line 35 nested

\n

This is line 36 nested

\n

This is line 37 nested

\n

This is line 38 nested

\n

This is line 39 nested

\n

This is line 40 nested

\n

This is line 41 nested

\n

This is line 42 nested

\n

This is line 43 nested

\n

This is line 44 nested

\n

This is line 45 nested

\n

This is line 46 nested

\n

This is line 47 nested

\n

This is line 48 nested

\n

This is line 49 nested

\n

This is line 50 nested

\n

This is line 51 nested

\n

This is line 52 nested

\n

This is line 53 nested

\n

This is line 54 nested

\n

This is line 55 nested

\n

This is line 56 nested

\n

This is line 57 nested

\n

This is line 58 nested

\n

This is line 59 nested

\n

This is line 60 nested

\n

This is line 61 nested

\n

This is line 62 nested

\n

This is line 63 nested

\n

This is line 64 nested

\n

This is line 65 nested

\n

This is line 66 nested

\n

This is line 67 nested

\n

This is line 68 nested

\n

This is line 69 nested

\n

This is line 70 nested

\n

This is line 71 nested

\n

This is line 72 nested

\n

This is line 73 nested

\n

This is line 74 nested

\n

This is line 75 nested

\n + CSharpStatement - - }); + HtmlContent - (4666:162,0 [1026] StringLiterals.cshtml) -

This is line 1

\n

This is line 2

\n

This is line 3

\n

This is line 4

\n

This is line 5

\n

This is line 6

\n

This is line 7

\n

This is line 8

\n

This is line 9

\n

This is line 10

\n

This is line 11

\n

This is line 12

\n

This is line 13

\n

This is line 14

\n

This is line 15

\n

This is line 16

\n

This is line 17

\n

This is line 18

\n

This is line 19

\n

This is line 20

\n

This is line 21

\n

This is line 22

\n

This is line 23

\n

This is line 24

\n

This is line 25

\n

This is line 26

\n

This is line 27

\n

This is line 28

\n

This is line 29

\n

This is line 30

\n

This is line 31

\n

This is line 32

\n

This is line 33

\n

This is line 34

\n

This is line 35

\n

This is line 36

\n

This is line 37

\n

This is line 38

\n

This is line 39

\n

This is line 40

\n

This is line 41

\n

This is line 42

\n

This is line 43

hi!\n + CSharpStatement - - DefineSection("WriteLiteralsToInHereAlso", async () => { + HtmlContent - (5728:205,36 [1023] StringLiterals.cshtml) - \n

This is line 1 nested

\n

This is line 2 nested

\n

This is line 3 nested

\n

This is line 4 nested

\n

This is line 5 nested

\n

This is line 6 nested

\n

This is line 7 nested

\n

This is line 8 nested

\n

This is line 9 nested

\n

This is line 10 nested

\n

This is line 11 nested

\n

This is line 12 nested

\n

This is line 13 nested

\n

This is line 14 nested

\n

This is line 15 nested

\n

This is line 16 nested

\n

This is line 17 nested

\n

This is line 18 nested

\n

This is line 19 nested

\n

This is line 20 nested

\n

This is line 21 nested

\n

This is line 22 nested

\n

This is line 23 nested

\n

This is line 24 nested

\n

This is line 25 nested

\n

This is line 26 nested

\n

This is line 27 nested

\n

This is line 28 nested

\n

This is line 29 nested

\n

30

\n + CSharpStatement - - }); + HtmlContent - (6752:236,1 [1] StringLiterals.cshtml) - ! diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt new file mode 100644 index 0000000000..0680701131 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_DesignTime.ir.txt @@ -0,0 +1,74 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (278:8,1 [4] Templates.cshtml) - \n\n + CSharpStatement - (284:10,2 [34] Templates.cshtml) - \n Func foo = + Template - (325:11,39 [16] Templates.cshtml) + HtmlContent - (325:11,39 [11] Templates.cshtml) - This works + CSharpExpression - (337:11,51 [4] Templates.cshtml) + RazorIRToken - (337:11,51 [4] Templates.cshtml) - CSharp - item + HtmlContent - (341:11,55 [1] Templates.cshtml) - ! + CSharpStatement - (349:11,63 [7] Templates.cshtml) - ;\n + CSharpExpression - (357:12,5 [7] Templates.cshtml) + RazorIRToken - (357:12,5 [7] Templates.cshtml) - CSharp - foo("") + CSharpStatement - (364:12,12 [2] Templates.cshtml) - \n + HtmlContent - (369:14,0 [8] Templates.cshtml) - \n
    \n + CSharpExpression - (379:16,2 [31] Templates.cshtml) + RazorIRToken - (379:16,2 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (391:16,14 [19] Templates.cshtml) + HtmlContent - (391:16,14 [10] Templates.cshtml) -
  • Item # + CSharpExpression - (402:16,25 [4] Templates.cshtml) + RazorIRToken - (402:16,25 [4] Templates.cshtml) - CSharp - item + HtmlContent - (406:16,29 [5] Templates.cshtml) -
  • + RazorIRToken - (411:16,34 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (413:16,36 [16] Templates.cshtml) - \n
\n\n

\n + CSharpExpression - (430:20,1 [52] Templates.cshtml) + RazorIRToken - (430:20,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (448:21,6 [35] Templates.cshtml) + HtmlContent - (448:21,6 [14] Templates.cshtml) - This is line# + CSharpExpression - (463:21,21 [4] Templates.cshtml) + RazorIRToken - (463:21,21 [4] Templates.cshtml) - CSharp - item + HtmlContent - (467:21,25 [17] Templates.cshtml) - of markup
\n + RazorIRToken - (484:22,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (485:22,1 [15] Templates.cshtml) - \n

\n\n

\n + CSharpExpression - (501:26,1 [54] Templates.cshtml) + RazorIRToken - (501:26,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (519:27,6 [37] Templates.cshtml) + HtmlContent - (519:27,6 [15] Templates.cshtml) - : This is line# + CSharpExpression - (535:27,22 [4] Templates.cshtml) + RazorIRToken - (535:27,22 [4] Templates.cshtml) - CSharp - item + HtmlContent - (539:27,26 [18] Templates.cshtml) - of markup
\n + RazorIRToken - (557:28,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (558:28,1 [15] Templates.cshtml) - \n

\n\n

\n + CSharpExpression - (574:32,1 [55] Templates.cshtml) + RazorIRToken - (574:32,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (592:33,6 [38] Templates.cshtml) + HtmlContent - (592:33,6 [16] Templates.cshtml) - :: This is line# + CSharpExpression - (609:33,23 [4] Templates.cshtml) + RazorIRToken - (609:33,23 [4] Templates.cshtml) - CSharp - item + HtmlContent - (613:33,27 [18] Templates.cshtml) - of markup
\n + RazorIRToken - (631:34,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (632:34,1 [22] Templates.cshtml) - \n

\n\n\n
    \n + CSharpExpression - (655:39,5 [141] Templates.cshtml) + RazorIRToken - (655:39,5 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (667:39,17 [129] Templates.cshtml) + HtmlContent - (667:39,17 [20] Templates.cshtml) -
  • \n Item # + CSharpExpression - (688:40,15 [4] Templates.cshtml) + RazorIRToken - (688:40,15 [4] Templates.cshtml) - CSharp - item + HtmlContent - (692:40,19 [10] Templates.cshtml) - \n + CSharpStatement - (704:41,10 [18] Templates.cshtml) - var parent = item; + HtmlContent - (725:42,0 [53] Templates.cshtml) -
      \n
    • Child Items... ?
    • \n + HtmlContent - (839:45,0 [24] Templates.cshtml) -
    \n
  • + RazorIRToken - (863:46,9 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (864:46,10 [8] Templates.cshtml) - \n
+ CSharpStatement - (12:0,12 [265] Templates.cshtml) - \n public HelperResult Repeat(int times, Func template) {\n return new HelperResult((writer) => {\n for(int i = 0; i < times; i++) {\n ((HelperResult)template(i)).WriteTo(writer);\n }\n });\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.ir.txt new file mode 100644 index 0000000000..0b74cb58c7 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Templates_Runtime.ir.txt @@ -0,0 +1,69 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Templates_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (280:9,0 [2] Templates.cshtml) - \n + CSharpStatement - (284:10,2 [34] Templates.cshtml) - \n Func foo = + Template - (325:11,39 [16] Templates.cshtml) + HtmlContent - (325:11,39 [11] Templates.cshtml) - This works + CSharpExpression - (337:11,51 [4] Templates.cshtml) + RazorIRToken - (337:11,51 [4] Templates.cshtml) - CSharp - item + HtmlContent - (341:11,55 [1] Templates.cshtml) - ! + CSharpStatement - (349:11,63 [7] Templates.cshtml) - ;\n + CSharpExpression - (357:12,5 [7] Templates.cshtml) + RazorIRToken - (357:12,5 [7] Templates.cshtml) - CSharp - foo("") + CSharpStatement - (364:12,12 [2] Templates.cshtml) - \n + HtmlContent - (369:14,0 [8] Templates.cshtml) - \n
    \n + CSharpExpression - (379:16,2 [31] Templates.cshtml) + RazorIRToken - (379:16,2 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (391:16,14 [19] Templates.cshtml) + HtmlContent - (391:16,14 [10] Templates.cshtml) -
  • Item # + CSharpExpression - (402:16,25 [4] Templates.cshtml) + RazorIRToken - (402:16,25 [4] Templates.cshtml) - CSharp - item + HtmlContent - (406:16,29 [5] Templates.cshtml) -
  • + RazorIRToken - (411:16,34 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (413:16,36 [16] Templates.cshtml) - \n
\n\n

\n + CSharpExpression - (430:20,1 [52] Templates.cshtml) + RazorIRToken - (430:20,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (448:21,6 [35] Templates.cshtml) + HtmlContent - (448:21,6 [14] Templates.cshtml) - This is line# + CSharpExpression - (463:21,21 [4] Templates.cshtml) + RazorIRToken - (463:21,21 [4] Templates.cshtml) - CSharp - item + HtmlContent - (467:21,25 [17] Templates.cshtml) - of markup
\n + RazorIRToken - (484:22,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (485:22,1 [15] Templates.cshtml) - \n

\n\n

\n + CSharpExpression - (501:26,1 [54] Templates.cshtml) + RazorIRToken - (501:26,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (519:27,6 [37] Templates.cshtml) + HtmlContent - (519:27,6 [15] Templates.cshtml) - : This is line# + CSharpExpression - (535:27,22 [4] Templates.cshtml) + RazorIRToken - (535:27,22 [4] Templates.cshtml) - CSharp - item + HtmlContent - (539:27,26 [18] Templates.cshtml) - of markup
\n + RazorIRToken - (557:28,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (558:28,1 [15] Templates.cshtml) - \n

\n\n

\n + CSharpExpression - (574:32,1 [55] Templates.cshtml) + RazorIRToken - (574:32,1 [16] Templates.cshtml) - CSharp - Repeat(10,\n + Template - (592:33,6 [38] Templates.cshtml) + HtmlContent - (592:33,6 [16] Templates.cshtml) - :: This is line# + CSharpExpression - (609:33,23 [4] Templates.cshtml) + RazorIRToken - (609:33,23 [4] Templates.cshtml) - CSharp - item + HtmlContent - (613:33,27 [18] Templates.cshtml) - of markup
\n + RazorIRToken - (631:34,0 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (632:34,1 [22] Templates.cshtml) - \n

\n\n\n
    \n + CSharpExpression - (655:39,5 [141] Templates.cshtml) + RazorIRToken - (655:39,5 [11] Templates.cshtml) - CSharp - Repeat(10, + Template - (667:39,17 [129] Templates.cshtml) + HtmlContent - (667:39,17 [20] Templates.cshtml) -
  • \n Item # + CSharpExpression - (688:40,15 [4] Templates.cshtml) + RazorIRToken - (688:40,15 [4] Templates.cshtml) - CSharp - item + HtmlContent - (692:40,19 [2] Templates.cshtml) - \n + CSharpStatement - (694:41,0 [8] Templates.cshtml) - + CSharpStatement - (704:41,10 [18] Templates.cshtml) - var parent = item; + HtmlContent - (725:42,0 [53] Templates.cshtml) -
      \n
    • Child Items... ?
    • \n + HtmlContent - (839:45,0 [24] Templates.cshtml) -
    \n
  • + RazorIRToken - (863:46,9 [1] Templates.cshtml) - CSharp - ) + HtmlContent - (864:46,10 [8] Templates.cshtml) - \n
+ CSharpStatement - (12:0,12 [265] Templates.cshtml) - \n public HelperResult Repeat(int times, Func template) {\n return new HelperResult((writer) => {\n for(int i = 0; i < times; i++) {\n ((HelperResult)template(i)).WriteTo(writer);\n }\n });\n }\n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.ir.txt new file mode 100644 index 0000000000..4fbfbe0917 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_DesignTime.ir.txt @@ -0,0 +1,17 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UnfinishedExpressionInCode_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [2] UnfinishedExpressionInCode.cshtml) - \n + CSharpExpression - (5:1,1 [9] UnfinishedExpressionInCode.cshtml) + RazorIRToken - (5:1,1 [9] UnfinishedExpressionInCode.cshtml) - CSharp - DateTime. + CSharpStatement - (14:1,10 [2] UnfinishedExpressionInCode.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.ir.txt new file mode 100644 index 0000000000..1fede8d027 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UnfinishedExpressionInCode_Runtime.ir.txt @@ -0,0 +1,11 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UnfinishedExpressionInCode_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + CSharpStatement - (2:0,2 [2] UnfinishedExpressionInCode.cshtml) - \n + CSharpExpression - (5:1,1 [9] UnfinishedExpressionInCode.cshtml) + RazorIRToken - (5:1,1 [9] UnfinishedExpressionInCode.cshtml) - CSharp - DateTime. + CSharpStatement - (14:1,10 [2] UnfinishedExpressionInCode.cshtml) - \n diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.codegen.cs index bd780f5783..3522c871d7 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.codegen.cs @@ -3,11 +3,31 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #line hidden using System; using System.Threading.Tasks; - using System.IO; - using Foo = System.Text.Encoding; - using static System; - using static System.Console; - using static global::System.Text.Encoding; +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using System.IO; + +#line default +#line hidden +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using Foo = System.Text.Encoding; + +#line default +#line hidden +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System; + +#line default +#line hidden +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System.Console; + +#line default +#line hidden +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static global::System.Text.Encoding; + +#line default +#line hidden public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Usings_DesignTime { #pragma warning disable 219 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.ir.txt new file mode 100644 index 0000000000..0cd17d6065 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.ir.txt @@ -0,0 +1,30 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + UsingStatement - (1:0,1 [15] Usings.cshtml) - System.IO + UsingStatement - (19:1,1 [32] Usings.cshtml) - Foo = System.Text.Encoding + UsingStatement - (71:4,1 [19] Usings.cshtml) - static System + UsingStatement - (93:5,1 [27] Usings.cshtml) - static System.Console + UsingStatement - (123:6,1 [41] Usings.cshtml) - static global::System.Text.Encoding + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Usings_DesignTime - - + DirectiveTokenHelper - + CSharpStatement - - #pragma warning disable 219 + CSharpStatement - - private void __RazorDirectiveTokenHelpers__() { + CSharpStatement - - } + CSharpStatement - - #pragma warning restore 219 + CSharpStatement - - private static System.Object __o = null; + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (16:0,16 [2] Usings.cshtml) - \n + HtmlContent - (51:1,33 [2] Usings.cshtml) - \n + HtmlContent - (66:2,13 [4] Usings.cshtml) - \n\n + HtmlContent - (90:4,20 [2] Usings.cshtml) - \n + HtmlContent - (120:5,28 [2] Usings.cshtml) - \n + HtmlContent - (164:6,42 [32] Usings.cshtml) - \n\n

Path's full type name is + CSharpExpression - (197:8,29 [21] Usings.cshtml) + RazorIRToken - (197:8,29 [21] Usings.cshtml) - CSharp - typeof(Path).FullName + HtmlContent - (218:8,50 [40] Usings.cshtml) -

\n

Foo's actual full type name is + CSharpExpression - (259:9,35 [20] Usings.cshtml) + RazorIRToken - (259:9,35 [20] Usings.cshtml) - CSharp - typeof(Foo).FullName + HtmlContent - (279:9,55 [4] Usings.cshtml) -

diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.mappings.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.mappings.txt index f9e85e6e1e..6cd4cd189e 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.mappings.txt +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_DesignTime.mappings.txt @@ -1,10 +1,10 @@ Source Location: (197:8,29 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml) |typeof(Path).FullName| -Generated Location: (839:21,32 [21] ) +Generated Location: (1384:41,32 [21] ) |typeof(Path).FullName| Source Location: (259:9,35 [20] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml) |typeof(Foo).FullName| -Generated Location: (1015:26,38 [20] ) +Generated Location: (1560:46,38 [20] ) |typeof(Foo).FullName| diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs index d488743611..24c67f7d49 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.codegen.cs @@ -4,11 +4,31 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles #line hidden using System; using System.Threading.Tasks; - using System.IO; - using Foo = System.Text.Encoding; - using static System; - using static System.Console; - using static global::System.Text.Encoding; +#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using System.IO; + +#line default +#line hidden +#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using Foo = System.Text.Encoding; + +#line default +#line hidden +#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System; + +#line default +#line hidden +#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static System.Console; + +#line default +#line hidden +#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings.cshtml" +using static global::System.Text.Encoding; + +#line default +#line hidden public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Usings_Runtime { #pragma warning disable 1998 diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.ir.txt b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.ir.txt new file mode 100644 index 0000000000..e765020b76 --- /dev/null +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Usings_Runtime.ir.txt @@ -0,0 +1,20 @@ +Document - + Checksum - + NamespaceDeclaration - - Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles + UsingStatement - - System + UsingStatement - - System.Threading.Tasks + UsingStatement - (1:0,1 [17] Usings.cshtml) - System.IO + UsingStatement - (19:1,1 [34] Usings.cshtml) - Foo = System.Text.Encoding + UsingStatement - (71:4,1 [21] Usings.cshtml) - static System + UsingStatement - (93:5,1 [29] Usings.cshtml) - static System.Console + UsingStatement - (123:6,1 [43] Usings.cshtml) - static global::System.Text.Encoding + ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Usings_Runtime - - + RazorMethodDeclaration - - public - async - System.Threading.Tasks.Task - ExecuteAsync + HtmlContent - (68:3,0 [2] Usings.cshtml) - \n + HtmlContent - (166:7,0 [30] Usings.cshtml) - \n

Path's full type name is + CSharpExpression - (197:8,29 [21] Usings.cshtml) + RazorIRToken - (197:8,29 [21] Usings.cshtml) - CSharp - typeof(Path).FullName + HtmlContent - (218:8,50 [40] Usings.cshtml) -

\n

Foo's actual full type name is + CSharpExpression - (259:9,35 [20] Usings.cshtml) + RazorIRToken - (259:9,35 [20] Usings.cshtml) - CSharp - typeof(Foo).FullName + HtmlContent - (279:9,55 [4] Usings.cshtml) -