Merge branch 'rel/15.3' into dev

# Conflicts:
#	test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test/IntegrationTests/CodeGenerationIntegrationTest.cs
This commit is contained in:
N. Taylor Mullen 2017-05-17 11:24:32 -07:00
commit 657c2a8da3
99 changed files with 1819 additions and 1962 deletions

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.26228.9 VisualStudioVersion = 15.0.26428.3
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}"
EndProject EndProject
@ -18,7 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
NuGet.config = NuGet.config NuGet.config = NuGet.config
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RazorPageGenerator", "src\RazorPageGenerator\RazorPageGenerator.csproj", "{7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPageGenerator", "src\RazorPageGenerator\RazorPageGenerator.csproj", "{7BE58880-36AD-4CD5-9E16-2A5AFEA790EF}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Language", "src\Microsoft.AspNetCore.Razor.Language\Microsoft.AspNetCore.Razor.Language.csproj", "{932F3C9C-A6C0-40D3-BA50-9309886242FC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Language", "src\Microsoft.AspNetCore.Razor.Language\Microsoft.AspNetCore.Razor.Language.csproj", "{932F3C9C-A6C0-40D3-BA50-9309886242FC}"
EndProject EndProject
@ -42,7 +42,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Lang
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPageGenerator.Test", "test\RazorPageGenerator.Test\RazorPageGenerator.Test.csproj", "{96EB1BD4-B8E0-4F52-A068-BBCACA7E3F63}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorPageGenerator.Test", "test\RazorPageGenerator.Test\RazorPageGenerator.Test.csproj", "{96EB1BD4-B8E0-4F52-A068-BBCACA7E3F63}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.LanguageServices.Razor.Test", "test\Microsoft.VisualStudio.LanguageServices.Razor.Test\Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj", "{37E61BDB-658E-4F44-A499-D64CC6D35485}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.LanguageServices.Razor.Test", "test\Microsoft.VisualStudio.LanguageServices.Razor.Test\Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj", "{37E61BDB-658E-4F44-A499-D64CC6D35485}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions", "src\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj", "{995F2FEB-65FA-4399-B1C0-16E0B3FBDB15}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions", "src\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj", "{995F2FEB-65FA-4399-B1C0-16E0B3FBDB15}"
EndProject EndProject
@ -52,6 +52,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Performance", "test\Microsoft.AspNetCore.Razor.Performance\Microsoft.AspNetCore.Razor.Performance.csproj", "{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Performance", "test\Microsoft.AspNetCore.Razor.Performance\Microsoft.AspNetCore.Razor.Performance.csproj", "{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.MvcShim", "test\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj", "{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -202,6 +204,14 @@ Global
{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.Release|Any CPU.Build.0 = Release|Any CPU {82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.Release|Any CPU.Build.0 = Release|Any CPU
{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {82C23CF8-95FF-40F7-BF50-3AD9EE21ED58}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.Release|Any CPU.Build.0 = Release|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -225,5 +235,6 @@ Global
{7CFD5646-A757-4498-9E01-9C8528ED60AE} = {92463391-81BE-462B-AC3C-78C6C760741F} {7CFD5646-A757-4498-9E01-9C8528ED60AE} = {92463391-81BE-462B-AC3C-78C6C760741F}
{078AEF36-F319-4CE2-BAA2-5B58A6536B46} = {92463391-81BE-462B-AC3C-78C6C760741F} {078AEF36-F319-4CE2-BAA2-5B58A6536B46} = {92463391-81BE-462B-AC3C-78C6C760741F}
{82C23CF8-95FF-40F7-BF50-3AD9EE21ED58} = {92463391-81BE-462B-AC3C-78C6C760741F} {82C23CF8-95FF-40F7-BF50-3AD9EE21ED58} = {92463391-81BE-462B-AC3C-78C6C760741F}
{8F165A3F-A18C-4649-AA08-C0E1BA5F5C90} = {92463391-81BE-462B-AC3C-78C6C760741F}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -3,5 +3,6 @@
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.VisualStudio.LanguageServices.Razor.Test\Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj" Condition="'$(OS)'!='Windows_NT'" /> <ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.VisualStudio.LanguageServices.Razor.Test\Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj" Condition="'$(OS)'!='Windows_NT'" />
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Test.Common\Microsoft.AspNetCore.Razor.Test.Common.csproj" /> <ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Test.Common\Microsoft.AspNetCore.Razor.Test.Common.csproj" />
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Performance\Microsoft.AspNetCore.Razor.Performance.csproj" /> <ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Performance\Microsoft.AspNetCore.Razor.Performance.csproj" />
<ExcludeFromTest Include="$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -56,14 +56,16 @@ namespace Microsoft.AspNetCore.Razor.Language.CodeGeneration
{ {
case DirectiveTokenKind.Type: case DirectiveTokenKind.Type:
// {node.Content} __typeHelper = null; // {node.Content} __typeHelper = default({node.Content});
context.AddLineMappingFor(node); context.AddLineMappingFor(node);
context.Writer context.Writer
.Write(node.Content) .Write(node.Content)
.Write(" ") .Write(" ")
.WriteStartAssignment(TypeHelper) .WriteStartAssignment(TypeHelper)
.WriteLine("null;"); .Write("default(")
.Write(node.Content)
.WriteLine(");");
break; break;
case DirectiveTokenKind.Member: case DirectiveTokenKind.Member:

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor.Extensions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Language.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Language.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Test.Common, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Test.Common, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("Microsoft.CodeAnalysis.Razor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.CodeAnalysis.Razor, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View File

@ -1,20 +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 System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
{
[HtmlTargetElement(Attributes = "prefix-*")]
public class DictionaryPrefixTestTagHelper : TagHelper
{
[HtmlAttributeName(DictionaryAttributePrefix = "prefix-")]
public IDictionary<string, ModelExpression> PrefixValues { get; set; } = new Dictionary<string, ModelExpression>();
public override void Process(TagHelperContext context, TagHelperOutput output)
{
}
}
}

View File

@ -1,13 +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 Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
{
public class InputTestTagHelper : TagHelper
{
public ModelExpression For { get; set; }
}
}

View File

@ -15,237 +15,222 @@ using Microsoft.CodeAnalysis.Emit;
using Microsoft.CodeAnalysis.Razor; using Microsoft.CodeAnalysis.Razor;
using Microsoft.Extensions.DependencyModel; using Microsoft.Extensions.DependencyModel;
using Xunit; using Xunit;
#if !NET46
using System.Runtime.Loader;
#endif
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
{ {
public class CodeGenerationIntegrationTest : IntegrationTestBase public class CodeGenerationIntegrationTest : IntegrationTestBase
{ {
private const string CurrentMvcShim = "Microsoft.AspNetCore.Razor.Test.MvcShim.dll";
private static readonly RazorSourceDocument DefaultImports = MvcRazorTemplateEngine.GetDefaultImports(); private static readonly RazorSourceDocument DefaultImports = MvcRazorTemplateEngine.GetDefaultImports();
#region Runtime #region Runtime
[Fact] [Fact]
public void IncompleteDirectives_Runtime() public void IncompleteDirectives_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class MyService<TModel>
var document = CreateCodeDocument(); {
public string Html { get; set; }
}";
var compilationReferences = CreateCompilationReferences(CurrentMvcShim, appCode);
// Act RunRuntimeTest(compilationReferences, expectedErrors: new[]
engine.Process(document); {
"Identifier expected"
// Assert });
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void InheritsViewModel_Runtime() public void InheritsViewModel_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); using System.Threading.Tasks;
var document = CreateCodeDocument(); using Microsoft.AspNetCore.Mvc.Razor;
// Act public class MyBasePageForViews<TModel> : RazorPage
engine.Process(document); {
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
public class MyModel
{
// Assert }
AssertIRMatchesBaseline(document.GetIRDocument()); ";
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunRuntimeTest(references);
} }
[Fact] [Fact]
public void InheritsWithViewImports_Runtime() public void InheritsWithViewImports_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); using System.Threading.Tasks;
var document = CreateCodeDocument(); using Microsoft.AspNetCore.Mvc.RazorPages;
// Act public abstract class MyPageModel<T> : Page
engine.Process(document); {
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
// Assert public class MyModel
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
}";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunRuntimeTest(references);
} }
[Fact] [Fact]
public void MalformedPageDirective_Runtime() public void MalformedPageDirective_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine(); RunRuntimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void Basic_Runtime() public void Basic_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine(); RunRuntimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void _ViewImports_Runtime() public void _ViewImports_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine(); RunRuntimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void Inject_Runtime() public void Inject_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateRuntimeEngine(); public class MyApp
var document = CreateCodeDocument(); {
public string MyProperty { get; set; }
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
// Act RunRuntimeTest(references);
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void InjectWithModel_Runtime() public void InjectWithModel_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateRuntimeEngine(); public class MyModel
var document = CreateCodeDocument(); {
// Act }
engine.Process(document);
// Assert public class MyService<TModel>
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); public string Html { get; set; }
}
public class MyApp
{
public string MyProperty { get; set; }
}";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunRuntimeTest(references);
} }
[Fact] [Fact]
public void InjectWithSemicolon_Runtime() public void InjectWithSemicolon_Runtime()
{ {
// Arrange var appCode = @"
var engine = CreateRuntimeEngine(); public class MyModel
var document = CreateCodeDocument(); {
// Act }
engine.Process(document);
// Assert public class MyApp
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); public string MyProperty { get; set; }
}
public class MyService<TModel>
{
public string Html { get; set; }
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunRuntimeTest(references);
} }
[Fact] [Fact]
public void Model_Runtime() public void Model_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine();
var document = CreateCodeDocument();
// Act RunRuntimeTest(references);
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact(Skip = "https://github.com/aspnet/Razor/issues/1348")]
public void ModelExpressionTagHelper_Runtime() public void ModelExpressionTagHelper_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateRuntimeEngine(); using Microsoft.AspNetCore.Mvc.ViewFeatures;
var document = CreateCodeDocument();
// Act public class InputTestTagHelper : {typeof(TagHelper).FullName}
engine.Process(document); {{
public ModelExpression For {{ get; set; }}
// Assert }}
AssertIRMatchesBaseline(document.GetIRDocument()); ");
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); RunRuntimeTest(references);
} }
[Fact] [Fact]
public void RazorPages_Runtime() public void RazorPages_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateRuntimeEngine(BuildDivDescriptors()); public class DivTagHelper : {typeof(TagHelper).FullName}
var document = CreateCodeDocument(); {{
// Act }}
engine.Process(document); ");
RunRuntimeTest(references);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void RazorPagesWithoutModel_Runtime() public void RazorPagesWithoutModel_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateRuntimeEngine(BuildDivDescriptors()); public class DivTagHelper : {typeof(TagHelper).FullName}
var document = CreateCodeDocument(); {{
// Act }}
engine.Process(document); ");
RunRuntimeTest(references);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void PageWithNamespace_Runtime() public void PageWithNamespace_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine(); RunRuntimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void ViewWithNamespace_Runtime() public void ViewWithNamespace_Runtime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateRuntimeEngine(); RunRuntimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
#endregion #endregion
@ -253,233 +238,230 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
[Fact] [Fact]
public void IncompleteDirectives_DesignTime() public void IncompleteDirectives_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class MyService<TModel>
var document = CreateCodeDocument(); {
public string Html { get; set; }
}
";
// Act var references = CreateCompilationReferences(CurrentMvcShim, appCode);
engine.Process(document); RunDesignTimeTest(
references,
// Assert expectedErrors: new[]
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); "Identifier expected"
});
} }
[Fact] [Fact]
public void InheritsViewModel_DesignTime() public void InheritsViewModel_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); using System.Threading.Tasks;
var document = CreateCodeDocument(); using Microsoft.AspNetCore.Mvc.Razor;
// Act public class MyBasePageForViews<TModel> : RazorPage
engine.Process(document); {
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
// Assert public class MyModel
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunDesignTimeTest(references);
} }
[Fact] [Fact]
public void InheritsWithViewImports_DesignTime() public void InheritsWithViewImports_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); using System.Threading.Tasks;
var document = CreateCodeDocument(); using Microsoft.AspNetCore.Mvc.RazorPages;
// Act public class MyModel
engine.Process(document); {
// Assert }
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); public abstract class MyPageModel<T> : Page
{
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunDesignTimeTest(references);
} }
[Fact] [Fact]
public void MalformedPageDirective_DesignTime() public void MalformedPageDirective_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateDesignTimeEngine(); RunDesignTimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void Basic_DesignTime() public void Basic_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateDesignTimeEngine(); RunDesignTimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void _ViewImports_DesignTime() public void _ViewImports_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateDesignTimeEngine(); RunDesignTimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void Inject_DesignTime() public void Inject_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class MyApp
var document = CreateCodeDocument(); {
public string MyProperty { get; set; }
// Act }
engine.Process(document); ";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
// Assert RunDesignTimeTest(references);
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void InjectWithModel_DesignTime() public void InjectWithModel_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class MyModel
var document = CreateCodeDocument(); {
// Act }
engine.Process(document);
// Assert public class MyService<TModel>
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); public string Html { get; set; }
}
public class MyApp
{
public string MyProperty { get; set; }
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunDesignTimeTest(references);
} }
[Fact] [Fact]
public void InjectWithSemicolon_DesignTime() public void InjectWithSemicolon_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class MyModel
var document = CreateCodeDocument(); {
// Act }
engine.Process(document);
// Assert public class MyService<TModel>
AssertIRMatchesBaseline(document.GetIRDocument()); {
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); public string Html { get; set; }
}
public class MyApp
{
public string MyProperty { get; set; }
}
";
var references = CreateCompilationReferences(CurrentMvcShim, appCode);
RunDesignTimeTest(references);
} }
[Fact] [Fact]
public void Model_DesignTime() public void Model_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateDesignTimeEngine(); RunDesignTimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void MultipleModels_DesignTime() public void MultipleModels_DesignTime()
{ {
// Arrange var appCode = @"
var engine = CreateDesignTimeEngine(); public class ThisShouldBeGenerated
var document = CreateCodeDocument(); {
// Act }";
engine.Process(document);
// Assert var references = CreateCompilationReferences(CurrentMvcShim, appCode);
AssertIRMatchesBaseline(document.GetIRDocument()); RunDesignTimeTest(references);
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact(Skip = "https://github.com/aspnet/Razor/issues/1348")]
public void ModelExpressionTagHelper_DesignTime() public void ModelExpressionTagHelper_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateDesignTimeEngine(); using Microsoft.AspNetCore.Mvc.ViewFeatures;
var document = CreateCodeDocument();
// Act public class InputTestTagHelper : {typeof(TagHelper).FullName}
engine.Process(document); {{
public ModelExpression For {{ get; set; }}
// Assert }}
AssertIRMatchesBaseline(document.GetIRDocument()); ");
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); RunDesignTimeTest(references);
} }
[Fact] [Fact]
public void RazorPages_DesignTime() public void RazorPages_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateDesignTimeEngine(BuildDivDescriptors()); public class DivTagHelper : {typeof(TagHelper).FullName}
var document = CreateCodeDocument(); {{
// Act }}
engine.Process(document); ");
RunDesignTimeTest(references);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void RazorPagesWithoutModel_DesignTime() public void RazorPagesWithoutModel_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim, appCode: $@"
var engine = CreateDesignTimeEngine(BuildDivDescriptors()); public class DivTagHelper : {typeof(TagHelper).FullName}
var document = CreateCodeDocument(); {{
// Act }}
engine.Process(document); ");
RunDesignTimeTest(references);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void PageWithNamespace_DesignTime() public void PageWithNamespace_DesignTime()
{ {
// Arrange var references = CreateCompilationReferences(CurrentMvcShim);
var engine = CreateDesignTimeEngine(); RunDesignTimeTest(references);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
} }
[Fact] [Fact]
public void ViewWithNamespace_DesignTime() public void ViewWithNamespace_DesignTime()
{
var references = CreateCompilationReferences(CurrentMvcShim);
RunDesignTimeTest(references);
}
#endregion
private void RunRuntimeTest(
IEnumerable<MetadataReference> compilationReferences,
IEnumerable<string> expectedErrors = null)
{ {
// Arrange // Arrange
var engine = CreateDesignTimeEngine(); var engine = CreateRuntimeEngine(compilationReferences);
var document = CreateCodeDocument(); var document = CreateCodeDocument();
// Act // Act
@ -488,48 +470,88 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
// Assert // Assert
AssertIRMatchesBaseline(document.GetIRDocument()); AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument()); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
AssertDocumentCompiles(document, compilationReferences, expectedErrors);
} }
#endregion
protected RazorEngine CreateDesignTimeEngine(IEnumerable<TagHelperDescriptor> descriptors = null) private void RunDesignTimeTest(
IEnumerable<MetadataReference> compilationReferences,
IEnumerable<string> expectedErrors = null)
{
// Arrange
var engine = CreateDesignTimeEngine(compilationReferences);
var document = CreateCodeDocument();
// Act
engine.Process(document);
// Assert
AssertIRMatchesBaseline(document.GetIRDocument());
AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
AssertLineMappingsMatchBaseline(document);
AssertDocumentCompiles(document, compilationReferences, expectedErrors);
}
private static IEnumerable<MetadataReference> CreateCompilationReferences(string mvcShimName, string appCode = null)
{
var shimReferences = CreateMvcShimReferences(mvcShimName);
return CreateAppCodeReferences(appCode, shimReferences);
}
private void AssertDocumentCompiles(
RazorCodeDocument document,
IEnumerable<MetadataReference> compilationReferences,
IEnumerable<string> expectedErrors = null)
{
var syntaxTree = CSharpSyntaxTree.ParseText(document.GetCSharpDocument().GeneratedCode);
var options = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary);
var compilation = CSharpCompilation.Create("CodeGenerationTestAssembly", new[] { syntaxTree }, compilationReferences, options);
var diagnostics = compilation.GetDiagnostics();
var errors = diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error);
if (expectedErrors == null)
{
Assert.Equal(0, errors.Count());
}
else
{
Assert.Equal(expectedErrors.Count(), errors.Count());
var expectedArray = expectedErrors.ToArray();
var actualArray = errors.ToArray();
for (var i = 0; i < expectedErrors.Count(); i++)
{
Assert.Equal(expectedArray[i], actualArray[i].GetMessage());
}
}
}
protected RazorEngine CreateDesignTimeEngine(IEnumerable<MetadataReference> references)
{ {
return RazorEngine.CreateDesignTime(b => return RazorEngine.CreateDesignTime(b =>
{ {
RazorExtensions.Register(b); RazorExtensions.Register(b);
b.Features.Add(GetMetadataReferenceFeature()); b.Features.Add(GetMetadataReferenceFeature(references));
b.Features.Add(new CompilationTagHelperFeature());
if (descriptors != null) b.Features.Add(new DefaultTagHelperDescriptorProvider() { DesignTime = true });
{ b.Features.Add(new ViewComponentTagHelperDescriptorProvider());
b.AddTagHelpers(descriptors);
}
else
{
b.Features.Add(new CompilationTagHelperFeature());
b.Features.Add(new DefaultTagHelperDescriptorProvider() { DesignTime = true });
b.Features.Add(new ViewComponentTagHelperDescriptorProvider());
}
}); });
} }
protected RazorEngine CreateRuntimeEngine(IEnumerable<TagHelperDescriptor> descriptors = null) protected RazorEngine CreateRuntimeEngine(IEnumerable<MetadataReference> references)
{ {
return RazorEngine.Create(b => return RazorEngine.Create(b =>
{ {
RazorExtensions.Register(b); RazorExtensions.Register(b);
b.Features.Add(GetMetadataReferenceFeature()); b.Features.Add(GetMetadataReferenceFeature(references));
b.Features.Add(new CompilationTagHelperFeature());
if (descriptors != null) b.Features.Add(new DefaultTagHelperDescriptorProvider() { DesignTime = true });
{ b.Features.Add(new ViewComponentTagHelperDescriptorProvider());
b.AddTagHelpers(descriptors);
}
else
{
b.Features.Add(new CompilationTagHelperFeature());
b.Features.Add(new DefaultTagHelperDescriptorProvider());
b.Features.Add(new ViewComponentTagHelperDescriptorProvider());
}
}); });
} }
@ -547,37 +569,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
imports.Add(RazorSourceDocument.Create(text, DefaultImports.FileName, DefaultImports.Encoding)); imports.Add(RazorSourceDocument.Create(text, DefaultImports.FileName, DefaultImports.Encoding));
} }
private static IEnumerable<TagHelperDescriptor> BuildDivDescriptors() private static MetadataReference BuildDynamicAssembly(
{ string text,
return new List<TagHelperDescriptor> IEnumerable<MetadataReference> references,
{
BuildDescriptor("div", "DivTagHelper", "TestAssembly"),
BuildDescriptor("a", "UrlResolutionTagHelper", "Microsoft.AspNetCore.Mvc.Razor")
};
}
private static TagHelperDescriptor BuildDescriptor(
string tagName,
string typeName,
string assemblyName) string assemblyName)
{ {
return TagHelperDescriptorBuilder.Create(typeName, assemblyName) var syntaxTree = new SyntaxTree[] { CSharpSyntaxTree.ParseText(text) };
.TagMatchingRule(ruleBuilder => ruleBuilder.RequireTagName(tagName))
.Build();
}
private static IMetadataReferenceFeature GetMetadataReferenceFeature()
{
var currentAssembly = typeof(CodeGenerationIntegrationTest).GetTypeInfo().Assembly;
var dependencyContext = DependencyContext.Load(currentAssembly);
var references = dependencyContext.CompileLibraries.SelectMany(l => l.ResolveReferencePaths())
.Select(assemblyPath => MetadataReference.CreateFromFile(assemblyPath))
.ToList<MetadataReference>();
var syntaxTree = CreateTagHelperSyntaxTree();
var compilation = CSharpCompilation.Create( var compilation = CSharpCompilation.Create(
"Microsoft.AspNetCore.Mvc.Razor", assemblyName,
syntaxTree, syntaxTree,
references, references,
options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)); options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
@ -588,25 +588,63 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.IntegrationTests
Assert.True(compilationResult.Success); Assert.True(compilationResult.Success);
references.Add(MetadataReference.CreateFromStream(stream)); return MetadataReference.CreateFromStream(stream);
var feature = new DefaultMetadataReferenceFeature()
{
References = references,
};
return feature;
} }
private static IEnumerable<SyntaxTree> CreateTagHelperSyntaxTree() private static IRazorEngineFeature GetMetadataReferenceFeature(IEnumerable<MetadataReference> references)
{ {
var text = $@" return new DefaultMetadataReferenceFeature()
public class UrlResolutionTagHelper : {typeof(TagHelper).FullName} {
{{ References = references.ToList()
};
}
}}"; private static IEnumerable<MetadataReference> CreateAppCodeReferences(string appCode, IEnumerable<MetadataReference> shimReferences)
{
var references = new List<MetadataReference>(shimReferences);
return new SyntaxTree[] { CSharpSyntaxTree.ParseText(text) }; if (appCode != null)
{
var appCodeSyntaxTrees = new List<SyntaxTree> { CSharpSyntaxTree.ParseText(appCode) };
var compilation = CSharpCompilation.Create(
"AppCode",
appCodeSyntaxTrees,
shimReferences,
options: new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
var stream = new MemoryStream();
var compilationResult = compilation.Emit(stream, options: new EmitOptions());
stream.Position = 0;
var diagString = string.Join(";", compilationResult.Diagnostics.Where(s => s.Severity == DiagnosticSeverity.Error).Select(s => s.ToString()));
Assert.True(compilationResult.Success, string.Format("Application code needed for tests didn't compile!: {0}", diagString));
references.Add(MetadataReference.CreateFromStream(stream));
}
return references;
}
private static IEnumerable<MetadataReference> CreateMvcShimReferences(string mvcShimName)
{
var dllPath = Path.Combine(Directory.GetCurrentDirectory(), mvcShimName);
Assembly assembly;
#if NET46
assembly = Assembly.LoadFile(dllPath);
#else
assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(dllPath);
#endif
var assemblyDependencyContext = DependencyContext.Load(assembly);
var assemblyReferencePaths = assemblyDependencyContext.CompileLibraries.SelectMany(l => l.ResolveReferencePaths());
var references = assemblyReferencePaths
.Select(assemblyPath => MetadataReference.CreateFromFile(assemblyPath))
.ToList<MetadataReference>();
Assert.NotEmpty(references);
return references;
} }
} }
} }

View File

@ -28,6 +28,30 @@
<PackageReference Include="Moq" Version="$(MoqVersion)" /> <PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" /> <PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" /> <PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.0.0-*" />
<!-- We need this to compile but don't want it referenced by the project.
It is included dynamically in CodeGeneration tests. -->
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>Content</OutputItemType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Targets>Build</Targets>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<MvcShim
Condition="$(TargetFramework) != ''"
Include="..\Microsoft.AspNetCore.Razor.Test.MvcShim\bin\$(Configuration)\$(TargetFramework)\Microsoft.AspNetCore.Razor.Test.MvcShim.deps.json" />
</ItemGroup>
<Target Name="CopyDepsFromShims" AfterTargets="Build">
<Copy SourceFiles="@(MvcShim)" DestinationFolder="$(OutputPath)" />
</Target>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project> </Project>

View File

@ -4,7 +4,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.Language; using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate; using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy; using Microsoft.AspNetCore.Razor.Language.Legacy;
@ -69,7 +68,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
.BindAttribute(attribute => .BindAttribute(attribute =>
attribute attribute
.Name("Foo") .Name("Foo")
.TypeName(typeof(ModelExpression).FullName)) .TypeName("Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression"))
.TagMatchingRule(rule => .TagMatchingRule(rule =>
rule.RequireTagName("p")) rule.RequireTagName("p"))
.Build() .Build()
@ -114,7 +113,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
.BindAttribute(attribute => .BindAttribute(attribute =>
attribute attribute
.Name("Foo") .Name("Foo")
.TypeName(typeof(ModelExpression).FullName)) .TypeName("Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression"))
.TagMatchingRule(rule => .TagMatchingRule(rule =>
rule.RequireTagName("p")) rule.RequireTagName("p"))
.Build() .Build()

View File

@ -1,4 +1,4 @@
<div class="@logo"> <div class="@this.ToString()">
Hello world Hello world
@Html.Input("SomeKey") @string.Format("{0}", "Hello")
</div> </div>

View File

@ -20,12 +20,12 @@ namespace AspNetCore
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" #line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
__o = logo; __o = this.ToString();
#line default #line default
#line hidden #line hidden
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" #line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
__o = Html.Input("SomeKey"); __o = string.Format("{0}", "Hello");
#line default #line default
#line hidden #line hidden

View File

@ -29,18 +29,19 @@ Document -
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (0:0,0 [4] Basic.cshtml) HtmlContent - (0:0,0 [4] Basic.cshtml)
RazorIRToken - (0:0,0 [4] Basic.cshtml) - Html - <div RazorIRToken - (0:0,0 [4] Basic.cshtml) - Html - <div
HtmlAttribute - (4:0,4 [14] Basic.cshtml) - class=" - " HtmlAttribute - (4:0,4 [25] Basic.cshtml) - class=" - "
CSharpAttributeValue - (12:0,12 [5] Basic.cshtml) - CSharpAttributeValue - (12:0,12 [16] Basic.cshtml) -
CSharpExpression - (13:0,13 [4] Basic.cshtml) CSharpExpression - (13:0,13 [15] Basic.cshtml)
RazorIRToken - (13:0,13 [4] Basic.cshtml) - CSharp - logo RazorIRToken - (13:0,13 [15] Basic.cshtml) - CSharp - this.ToString()
HtmlContent - (18:0,18 [24] Basic.cshtml) HtmlContent - (29:0,29 [24] Basic.cshtml)
RazorIRToken - (18:0,18 [1] Basic.cshtml) - Html - > RazorIRToken - (29:0,29 [1] Basic.cshtml) - Html - >
RazorIRToken - (19:0,19 [23] Basic.cshtml) - Html - \n Hello world\n RazorIRToken - (30:0,30 [23] Basic.cshtml) - Html - \n Hello world\n
CSharpExpression - (43:2,5 [21] Basic.cshtml) CSharpExpression - (54:2,5 [29] Basic.cshtml)
RazorIRToken - (43:2,5 [21] Basic.cshtml) - CSharp - Html.Input("SomeKey") RazorIRToken - (54:2,5 [29] Basic.cshtml) - CSharp - string.Format("{0}", "Hello")
HtmlContent - (64:2,26 [8] Basic.cshtml) HtmlContent - (83:2,34 [10] Basic.cshtml)
RazorIRToken - (64:2,26 [2] Basic.cshtml) - Html - \n RazorIRToken - (83:2,34 [2] Basic.cshtml) - Html - \n
RazorIRToken - (66:3,0 [6] Basic.cshtml) - Html - </div> RazorIRToken - (85:3,0 [6] Basic.cshtml) - Html - </div>
RazorIRToken - (91:3,6 [2] Basic.cshtml) - Html - \n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,10 +1,10 @@
Source Location: (13:0,13 [4] /TestFiles/Input/Basic.cshtml) Source Location: (13:0,13 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|logo| |this.ToString()|
Generated Location: (829:22,13 [4] ) Generated Location: (909:22,13 [15] )
|logo| |this.ToString()|
Source Location: (43:2,5 [21] /TestFiles/Input/Basic.cshtml) Source Location: (54:2,5 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|Html.Input("SomeKey")| |string.Format("{0}", "Hello")|
Generated Location: (914:27,6 [21] ) Generated Location: (1045:27,6 [29] )
|Html.Input("SomeKey")| |string.Format("{0}", "Hello")|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "54a70ff4c6d27ac6cdc6725cb6bab12012015729" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fd421120502bfd80d21169d04fd6ba54b5cc7f12"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
@ -17,25 +17,25 @@ namespace AspNetCore
BeginContext(0, 4, true); BeginContext(0, 4, true);
WriteLiteral("<div"); WriteLiteral("<div");
EndContext(); EndContext();
BeginWriteAttribute("class", " class=\"", 4, "\"", 17, 1); BeginWriteAttribute("class", " class=\"", 4, "\"", 28, 1);
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" #line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
WriteAttributeValue("", 12, logo, 12, 5, false); WriteAttributeValue("", 12, this.ToString(), 12, 16, false);
#line default #line default
#line hidden #line hidden
EndWriteAttribute(); EndWriteAttribute();
BeginContext(18, 24, true); BeginContext(29, 24, true);
WriteLiteral(">\r\n Hello world\r\n "); WriteLiteral(">\r\n Hello world\r\n ");
EndContext(); EndContext();
BeginContext(43, 21, false); BeginContext(54, 29, false);
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" #line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
Write(Html.Input("SomeKey")); Write(string.Format("{0}", "Hello"));
#line default #line default
#line hidden #line hidden
EndContext(); EndContext();
BeginContext(64, 8, true); BeginContext(83, 10, true);
WriteLiteral("\r\n</div>"); WriteLiteral("\r\n</div>\r\n");
EndContext(); EndContext();
} }
#pragma warning restore 1998 #pragma warning restore 1998

View File

@ -16,29 +16,30 @@ Document -
RazorIRToken - (0:0,0 [4] Basic.cshtml) - Html - <div RazorIRToken - (0:0,0 [4] Basic.cshtml) - Html - <div
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
HtmlAttribute - (4:0,4 [14] Basic.cshtml) - class=" - " HtmlAttribute - (4:0,4 [25] Basic.cshtml) - class=" - "
CSharpAttributeValue - (12:0,12 [5] Basic.cshtml) - CSharpAttributeValue - (12:0,12 [16] Basic.cshtml) -
CSharpExpression - (13:0,13 [4] Basic.cshtml) CSharpExpression - (13:0,13 [15] Basic.cshtml)
RazorIRToken - (13:0,13 [4] Basic.cshtml) - CSharp - logo RazorIRToken - (13:0,13 [15] Basic.cshtml) - CSharp - this.ToString()
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(18, 24, true); RazorIRToken - - CSharp - BeginContext(29, 24, true);
HtmlContent - (18:0,18 [24] Basic.cshtml) HtmlContent - (29:0,29 [24] Basic.cshtml)
RazorIRToken - (18:0,18 [1] Basic.cshtml) - Html - > RazorIRToken - (29:0,29 [1] Basic.cshtml) - Html - >
RazorIRToken - (19:0,19 [19] Basic.cshtml) - Html - \n Hello world\n RazorIRToken - (30:0,30 [19] Basic.cshtml) - Html - \n Hello world\n
RazorIRToken - (38:2,0 [4] Basic.cshtml) - Html - RazorIRToken - (49:2,0 [4] Basic.cshtml) - Html -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(43, 21, false); RazorIRToken - - CSharp - BeginContext(54, 29, false);
CSharpExpression - (43:2,5 [21] Basic.cshtml) CSharpExpression - (54:2,5 [29] Basic.cshtml)
RazorIRToken - (43:2,5 [21] Basic.cshtml) - CSharp - Html.Input("SomeKey") RazorIRToken - (54:2,5 [29] Basic.cshtml) - CSharp - string.Format("{0}", "Hello")
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(64, 8, true); RazorIRToken - - CSharp - BeginContext(83, 10, true);
HtmlContent - (64:2,26 [8] Basic.cshtml) HtmlContent - (83:2,34 [10] Basic.cshtml)
RazorIRToken - (64:2,26 [2] Basic.cshtml) - Html - \n RazorIRToken - (83:2,34 [2] Basic.cshtml) - Html - \n
RazorIRToken - (66:3,0 [6] Basic.cshtml) - Html - </div> RazorIRToken - (85:3,0 [6] Basic.cshtml) - Html - </div>
RazorIRToken - (91:3,6 [2] Basic.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
InjectDirective - InjectDirective -

View File

@ -9,7 +9,7 @@
@inject @inject
@inject @inject
@inject TypeName @inject MyService<TModel>
@namespace @namespace
@namespace @namespace

View File

@ -14,7 +14,7 @@ namespace
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
TypeName __typeHelper = null; MyService<TModel> __typeHelper = default(MyService<TModel>);
} }
))(); ))();
} }

View File

@ -24,7 +24,7 @@ Document -
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (159:11,8 [8] IncompleteDirectives.cshtml) - TypeName DirectiveToken - (159:11,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null; RazorIRToken - - CSharp - private static System.Object __o = null;
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
@ -40,10 +40,12 @@ Document -
RazorIRToken - (139:9,7 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (139:9,7 [2] IncompleteDirectives.cshtml) - Html - \n
HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml) HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml)
RazorIRToken - (149:10,8 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (149:10,8 [2] IncompleteDirectives.cshtml) - Html - \n
HtmlContent - (167:11,16 [4] IncompleteDirectives.cshtml) HtmlContent - (176:11,25 [4] IncompleteDirectives.cshtml)
RazorIRToken - (167:11,16 [4] IncompleteDirectives.cshtml) - Html - \n\n RazorIRToken - (176:11,25 [4] IncompleteDirectives.cshtml) - Html - \n\n
HtmlContent - (181:13,10 [2] IncompleteDirectives.cshtml) HtmlContent - (190:13,10 [2] IncompleteDirectives.cshtml)
RazorIRToken - (181:13,10 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (190:13,10 [2] IncompleteDirectives.cshtml) - Html - \n
HtmlContent - (203:14,11 [2] IncompleteDirectives.cshtml)
RazorIRToken - (203:14,11 [2] IncompleteDirectives.cshtml) - Html - \n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -0,0 +1,5 @@
Source Location: (159:11,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|MyService<TModel>|
Generated Location: (616:16,0 [17] )
|MyService<TModel>|

View File

@ -1,7 +1,7 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fec5cf763044f842fa2114e997bb07e0bf280cd6"
namespace namespace
{ {
#line hidden #line hidden
using TModel = global::System.Object;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -11,18 +11,36 @@ namespace
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml : global::Microsoft.AspNetCore.Mvc.RazorPages.Page public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml : global::Microsoft.AspNetCore.Mvc.RazorPages.Page
{ {
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
TypeName __typeHelper = null;
}
))();
}
#pragma warning restore 219
private static System.Object __o = null;
#pragma warning disable 1998 #pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {
BeginContext(83, 4, true);
WriteLiteral("\r\n\r\n");
EndContext();
BeginContext(108, 5, true);
WriteLiteral("\"\r\n\r\n");
EndContext();
BeginContext(119, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(128, 4, true);
WriteLiteral("\r\n\r\n");
EndContext();
BeginContext(139, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(149, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(176, 4, true);
WriteLiteral("\r\n\r\n");
EndContext();
BeginContext(190, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(203, 2, true);
WriteLiteral("\r\n");
EndContext();
} }
#pragma warning restore 1998 #pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute] [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]

View File

@ -1,49 +1,69 @@
Document - Document -
Checksum - Checksum -
NamespaceDeclaration - - NamespaceDeclaration - -
UsingStatement - - TModel = global::System.Object UsingStatement - (1:0,1 [14] ) - System
UsingStatement - (1:0,1 [12] ) - System UsingStatement - (16:1,1 [34] ) - System.Collections.Generic
UsingStatement - (16:1,1 [32] ) - System.Collections.Generic UsingStatement - (51:2,1 [19] ) - System.Linq
UsingStatement - (51:2,1 [17] ) - System.Linq UsingStatement - (71:3,1 [30] ) - System.Threading.Tasks
UsingStatement - (71:3,1 [28] ) - System.Threading.Tasks UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
DesignTimeDirective -
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
DirectiveToken - (294:7,71 [4] ) - Html
DirectiveToken - (308:8,8 [54] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper
DirectiveToken - (363:8,63 [4] ) - Json
DirectiveToken - (377:9,8 [53] ) - global::Microsoft.AspNetCore.Mvc.IViewComponentHelper
DirectiveToken - (431:9,62 [9] ) - Component
DirectiveToken - (450:10,8 [43] ) - global::Microsoft.AspNetCore.Mvc.IUrlHelper
DirectiveToken - (494:10,52 [3] ) - Url
DirectiveToken - (507:11,8 [70] ) - global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider
DirectiveToken - (578:11,79 [23] ) - ModelExpressionProvider
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (159:11,8 [8] IncompleteDirectives.cshtml) - TypeName
CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null;
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(83, 4, true);
HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml) HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml)
RazorIRToken - (83:0,83 [4] IncompleteDirectives.cshtml) - Html - \n\n RazorIRToken - (83:0,83 [4] IncompleteDirectives.cshtml) - Html - \n\n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(108, 5, true);
HtmlContent - (108:4,6 [5] IncompleteDirectives.cshtml) HtmlContent - (108:4,6 [5] IncompleteDirectives.cshtml)
RazorIRToken - (108:4,6 [5] IncompleteDirectives.cshtml) - Html - "\n\n RazorIRToken - (108:4,6 [5] IncompleteDirectives.cshtml) - Html - "\n\n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(119, 2, true);
HtmlContent - (119:6,6 [2] IncompleteDirectives.cshtml) HtmlContent - (119:6,6 [2] IncompleteDirectives.cshtml)
RazorIRToken - (119:6,6 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (119:6,6 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(128, 4, true);
HtmlContent - (128:7,7 [4] IncompleteDirectives.cshtml) HtmlContent - (128:7,7 [4] IncompleteDirectives.cshtml)
RazorIRToken - (128:7,7 [4] IncompleteDirectives.cshtml) - Html - \n\n RazorIRToken - (128:7,7 [4] IncompleteDirectives.cshtml) - Html - \n\n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(139, 2, true);
HtmlContent - (139:9,7 [2] IncompleteDirectives.cshtml) HtmlContent - (139:9,7 [2] IncompleteDirectives.cshtml)
RazorIRToken - (139:9,7 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (139:9,7 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(149, 2, true);
HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml) HtmlContent - (149:10,8 [2] IncompleteDirectives.cshtml)
RazorIRToken - (149:10,8 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - (149:10,8 [2] IncompleteDirectives.cshtml) - Html - \n
HtmlContent - (167:11,16 [4] IncompleteDirectives.cshtml) CSharpStatement -
RazorIRToken - (167:11,16 [4] IncompleteDirectives.cshtml) - Html - \n\n RazorIRToken - - CSharp - EndContext();
HtmlContent - (181:13,10 [2] IncompleteDirectives.cshtml) CSharpStatement -
RazorIRToken - (181:13,10 [2] IncompleteDirectives.cshtml) - Html - \n RazorIRToken - - CSharp - BeginContext(176, 4, true);
HtmlContent - (176:11,25 [4] IncompleteDirectives.cshtml)
RazorIRToken - (176:11,25 [4] IncompleteDirectives.cshtml) - Html - \n\n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(190, 2, true);
HtmlContent - (190:13,10 [2] IncompleteDirectives.cshtml)
RazorIRToken - (190:13,10 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
CSharpStatement -
RazorIRToken - - CSharp - BeginContext(203, 2, true);
HtmlContent - (203:14,11 [2] IncompleteDirectives.cshtml)
RazorIRToken - (203:14,11 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpStatement -
RazorIRToken - - CSharp - EndContext();
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -14,11 +14,11 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
MyBasePageForViews<TModel> __typeHelper = null; MyBasePageForViews<TModel> __typeHelper = default(MyBasePageForViews<TModel>);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyModel __typeHelper = null; MyModel __typeHelper = default(MyModel);
} }
))(); ))();
} }

View File

@ -0,0 +1,10 @@
Source Location: (10:0,10 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml)
|MyBasePageForViews<TModel>|
Generated Location: (602:16,0 [26] )
|MyBasePageForViews<TModel>|
Source Location: (45:1,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml)
|MyModel|
Generated Location: (742:20,0 [7] )
|MyModel|

View File

@ -1,7 +1,7 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "91cf923452a86b2906083cb0236d6d5b3bc528ef"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
using TModel = global::System.Object;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -11,19 +11,6 @@ namespace AspNetCore
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml : MyBasePageForViews<MyModel> public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml : MyBasePageForViews<MyModel>
{ {
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
MyBasePageForViews<TModel> __typeHelper = null;
}
))();
((System.Action)(() => {
MyModel __typeHelper = null;
}
))();
}
#pragma warning restore 219
private static System.Object __o = null;
#pragma warning disable 1998 #pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {

View File

@ -1,33 +1,14 @@
Document - Document -
Checksum - Checksum -
NamespaceDeclaration - - AspNetCore NamespaceDeclaration - - AspNetCore
UsingStatement - - TModel = global::System.Object UsingStatement - (1:0,1 [14] ) - System
UsingStatement - (1:0,1 [12] ) - System UsingStatement - (16:1,1 [34] ) - System.Collections.Generic
UsingStatement - (16:1,1 [32] ) - System.Collections.Generic UsingStatement - (51:2,1 [19] ) - System.Linq
UsingStatement - (51:2,1 [17] ) - System.Linq UsingStatement - (71:3,1 [30] ) - System.Threading.Tasks
UsingStatement - (71:3,1 [28] ) - System.Threading.Tasks UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml - MyBasePageForViews<MyModel> - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml - MyBasePageForViews<MyModel> -
DesignTimeDirective -
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
DirectiveToken - (294:7,71 [4] ) - Html
DirectiveToken - (308:8,8 [54] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper
DirectiveToken - (363:8,63 [4] ) - Json
DirectiveToken - (377:9,8 [53] ) - global::Microsoft.AspNetCore.Mvc.IViewComponentHelper
DirectiveToken - (431:9,62 [9] ) - Component
DirectiveToken - (450:10,8 [43] ) - global::Microsoft.AspNetCore.Mvc.IUrlHelper
DirectiveToken - (494:10,52 [3] ) - Url
DirectiveToken - (507:11,8 [70] ) - global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider
DirectiveToken - (578:11,79 [23] ) - ModelExpressionProvider
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (10:0,10 [26] InheritsViewModel.cshtml) - MyBasePageForViews<TModel>
DirectiveToken - (45:1,7 [7] InheritsViewModel.cshtml) - MyModel
CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null;
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -14,7 +14,7 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
MyModel __typeHelper = null; MyModel __typeHelper = default(MyModel);
} }
))(); ))();
} }

View File

@ -0,0 +1,5 @@
Source Location: (14:1,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml)
|MyModel|
Generated Location: (601:16,0 [7] )
|MyModel|

View File

@ -1,7 +1,7 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "052fe5ad02d36ebdf943dddd543cb26aaff62411"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
using TModel = global::System.Object;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -11,15 +11,6 @@ namespace AspNetCore
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml : MyPageModel<MyModel> public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml : MyPageModel<MyModel>
{ {
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
MyModel __typeHelper = null;
}
))();
}
#pragma warning restore 219
private static System.Object __o = null;
#pragma warning disable 1998 #pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {

View File

@ -1,33 +1,14 @@
Document - Document -
Checksum - Checksum -
NamespaceDeclaration - - AspNetCore NamespaceDeclaration - - AspNetCore
UsingStatement - - TModel = global::System.Object UsingStatement - (1:0,1 [14] ) - System
UsingStatement - (1:0,1 [12] ) - System UsingStatement - (16:1,1 [34] ) - System.Collections.Generic
UsingStatement - (16:1,1 [32] ) - System.Collections.Generic UsingStatement - (51:2,1 [19] ) - System.Linq
UsingStatement - (51:2,1 [17] ) - System.Linq UsingStatement - (71:3,1 [30] ) - System.Threading.Tasks
UsingStatement - (71:3,1 [28] ) - System.Threading.Tasks UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml - MyPageModel<MyModel> - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml - MyPageModel<MyModel> -
DesignTimeDirective -
DirectiveToken - (10:0,10 [19] InheritsWithViewImports_Imports0.cshtml) - MyPageModel<TModel>
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
DirectiveToken - (294:7,71 [4] ) - Html
DirectiveToken - (308:8,8 [54] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper
DirectiveToken - (363:8,63 [4] ) - Json
DirectiveToken - (377:9,8 [53] ) - global::Microsoft.AspNetCore.Mvc.IViewComponentHelper
DirectiveToken - (431:9,62 [9] ) - Component
DirectiveToken - (450:10,8 [43] ) - global::Microsoft.AspNetCore.Mvc.IUrlHelper
DirectiveToken - (494:10,52 [3] ) - Url
DirectiveToken - (507:11,8 [70] ) - global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider
DirectiveToken - (578:11,79 [23] ) - ModelExpressionProvider
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (14:1,7 [7] InheritsWithViewImports.cshtml) - MyModel
CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null;
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,2 +1 @@
@using MyNamespace @inject MyApp MyPropertyName
@inject MyApp MyPropertyName

View File

@ -1,3 +1,3 @@
@model MyModel @model MyModel
@inject MyApp MyPropertyName @inject MyApp MyPropertyName
@inject MyService<TModel> Html @inject MyService<TModel> Html

View File

@ -14,11 +14,11 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
MyModel __typeHelper = null; MyModel __typeHelper = default(MyModel);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyApp __typeHelper = null; MyApp __typeHelper = default(MyApp);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
@ -26,7 +26,7 @@ global::System.Object MyPropertyName = null;
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyService<TModel> __typeHelper = null; MyService<TModel> __typeHelper = default(MyService<TModel>);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {

View File

@ -1,25 +1,25 @@
Source Location: (7:0,7 [7] /TestFiles/Input/InjectWithModel.cshtml) Source Location: (7:0,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyModel| |MyModel|
Generated Location: (576:16,0 [7] ) Generated Location: (630:16,0 [7] )
|MyModel| |MyModel|
Source Location: (24:1,8 [5] /TestFiles/Input/InjectWithModel.cshtml) Source Location: (24:1,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyApp| |MyApp|
Generated Location: (666:20,0 [5] ) Generated Location: (732:20,0 [5] )
|MyApp| |MyApp|
Source Location: (30:1,14 [14] /TestFiles/Input/InjectWithModel.cshtml) Source Location: (30:1,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyPropertyName| |MyPropertyName|
Generated Location: (776:24,22 [14] ) Generated Location: (852:24,22 [14] )
|MyPropertyName| |MyPropertyName|
Source Location: (54:2,8 [17] /TestFiles/Input/InjectWithModel.cshtml) Source Location: (54:2,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyService<TModel>| |MyService<TModel>|
Generated Location: (860:28,0 [17] ) Generated Location: (936:28,0 [17] )
|MyService<TModel>| |MyService<TModel>|
Source Location: (72:2,26 [4] /TestFiles/Input/InjectWithModel.cshtml) Source Location: (72:2,26 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|Html| |Html|
Generated Location: (982:32,22 [4] ) Generated Location: (1080:32,22 [4] )
|Html| |Html|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1f010500f93116162444110956e512df61642f4e" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a039b7091118c718dc3023b6ac58d9645cb58e59"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden

View File

@ -2,4 +2,4 @@
@inject MyApp MyPropertyName; @inject MyApp MyPropertyName;
@inject MyService<TModel> Html; @inject MyService<TModel> Html;
@inject MyApp MyPropertyName2 ; @inject MyApp MyPropertyName2 ;
@inject MyService<TModel> Html2 ; @inject MyService<TModel> Html2 ;

View File

@ -14,11 +14,11 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
MyModel __typeHelper = null; MyModel __typeHelper = default(MyModel);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyApp __typeHelper = null; MyApp __typeHelper = default(MyApp);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
@ -26,7 +26,7 @@ global::System.Object MyPropertyName = null;
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyService<TModel> __typeHelper = null; MyService<TModel> __typeHelper = default(MyService<TModel>);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
@ -34,7 +34,7 @@ global::System.Object Html = null;
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyApp __typeHelper = null; MyApp __typeHelper = default(MyApp);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
@ -42,7 +42,7 @@ global::System.Object MyPropertyName2 = null;
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
MyService<TModel> __typeHelper = null; MyService<TModel> __typeHelper = default(MyService<TModel>);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {

View File

@ -1,45 +1,45 @@
Source Location: (7:0,7 [7] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (7:0,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyModel| |MyModel|
Generated Location: (580:16,0 [7] ) Generated Location: (634:16,0 [7] )
|MyModel| |MyModel|
Source Location: (24:1,8 [5] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (24:1,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyApp| |MyApp|
Generated Location: (670:20,0 [5] ) Generated Location: (736:20,0 [5] )
|MyApp| |MyApp|
Source Location: (30:1,14 [14] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (30:1,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyPropertyName| |MyPropertyName|
Generated Location: (780:24,22 [14] ) Generated Location: (856:24,22 [14] )
|MyPropertyName| |MyPropertyName|
Source Location: (58:2,8 [17] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (58:2,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyService<TModel>| |MyService<TModel>|
Generated Location: (864:28,0 [17] ) Generated Location: (940:28,0 [17] )
|MyService<TModel>| |MyService<TModel>|
Source Location: (76:2,26 [4] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (76:2,26 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|Html| |Html|
Generated Location: (986:32,22 [4] ) Generated Location: (1084:32,22 [4] )
|Html| |Html|
Source Location: (93:3,8 [5] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (93:3,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyApp| |MyApp|
Generated Location: (1060:36,0 [5] ) Generated Location: (1158:36,0 [5] )
|MyApp| |MyApp|
Source Location: (99:3,14 [15] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (99:3,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyPropertyName2| |MyPropertyName2|
Generated Location: (1170:40,22 [15] ) Generated Location: (1278:40,22 [15] )
|MyPropertyName2| |MyPropertyName2|
Source Location: (129:4,8 [17] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (129:4,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyService<TModel>| |MyService<TModel>|
Generated Location: (1255:44,0 [17] ) Generated Location: (1363:44,0 [17] )
|MyService<TModel>| |MyService<TModel>|
Source Location: (147:4,26 [5] /TestFiles/Input/InjectWithSemicolon.cshtml) Source Location: (147:4,26 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|Html2| |Html2|
Generated Location: (1377:48,22 [5] ) Generated Location: (1507:48,22 [5] )
|Html2| |Html2|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fc807ec0dc76610bdca62f482fefd7f584348df9" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5010aab35d235175dab517f8018e41aee9a2ac7f"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden

View File

@ -9,17 +9,12 @@ namespace AspNetCore
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml"
using MyNamespace;
#line default
#line hidden
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{ {
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
MyApp __typeHelper = null; MyApp __typeHelper = default(MyApp);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {

View File

@ -9,7 +9,6 @@ Document -
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (1:0,1 [17] Inject.cshtml) - MyNamespace
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
DesignTimeDirective - DesignTimeDirective -
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
@ -25,13 +24,11 @@ Document -
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (28:1,8 [5] Inject.cshtml) - MyApp DirectiveToken - (8:0,8 [5] Inject.cshtml) - MyApp
DirectiveToken - (34:1,14 [14] Inject.cshtml) - MyPropertyName DirectiveToken - (14:0,14 [14] Inject.cshtml) - MyPropertyName
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null; RazorIRToken - - CSharp - private static System.Object __o = null;
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (18:0,18 [2] Inject.cshtml)
RazorIRToken - (18:0,18 [2] Inject.cshtml) - Html - \n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,15 +1,10 @@
Source Location: (1:0,1 [17] /TestFiles/Input/Inject.cshtml) Source Location: (8:0,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml)
|using MyNamespace|
Generated Location: (379:12,0 [17] )
|using MyNamespace|
Source Location: (28:1,8 [5] /TestFiles/Input/Inject.cshtml)
|MyApp| |MyApp|
Generated Location: (674:21,0 [5] ) Generated Location: (621:16,0 [5] )
|MyApp| |MyApp|
Source Location: (34:1,14 [14] /TestFiles/Input/Inject.cshtml) Source Location: (14:0,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml)
|MyPropertyName| |MyPropertyName|
Generated Location: (784:25,22 [14] ) Generated Location: (741:20,22 [14] )
|MyPropertyName| |MyPropertyName|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "225760ec3beca02a80469066fab66433e90ddc2e" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c711078454f5b0e8d2cb77d9cb7fa88cca32b884"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
@ -9,11 +9,6 @@ namespace AspNetCore
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml"
using MyNamespace;
#line default
#line hidden
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{ {
#pragma warning disable 1998 #pragma warning disable 1998

View File

@ -8,7 +8,6 @@ Document -
UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (1:0,1 [19] Inject.cshtml) - MyNamespace
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
InjectDirective - InjectDirective -

View File

@ -1,6 +1,6 @@
@model DateTime @model DateTime
@addTagHelper Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper, Microsoft.AspNetCore.Mvc.Razor.Extensions.Test @addTagHelper "InputTestTagHelper, AppCode"
<input-test for="Now" /> <input-test for="Date" />
<input-test for="@Model" /> <input-test for="@Model" />

View File

@ -14,29 +14,29 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
DateTime __typeHelper = null; DateTime __typeHelper = default(DateTime);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
global::System.Object __typeHelper = "Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper, Microsoft.AspNetCore.Mvc.Razor.Extensions.Test"; global::System.Object __typeHelper = "InputTestTagHelper, AppCode";
} }
))(); ))();
} }
#pragma warning restore 219 #pragma warning restore 219
private static System.Object __o = null; private static System.Object __o = null;
private global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = null; private global::InputTestTagHelper __InputTestTagHelper = null;
#pragma warning disable 1998 #pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper>(); __InputTestTagHelper = CreateTagHelper<global::InputTestTagHelper>();
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Now); __InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Date);
#line default #line default
#line hidden #line hidden
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper>(); __InputTestTagHelper = CreateTagHelper<global::InputTestTagHelper>();
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" #line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => Model); __InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => Model);
#line default #line default
#line hidden #line hidden

View File

@ -25,38 +25,38 @@ Document -
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (7:0,7 [8] ModelExpressionTagHelper.cshtml) - DateTime DirectiveToken - (7:0,7 [8] ModelExpressionTagHelper.cshtml) - DateTime
DirectiveToken - (33:2,14 [108] ModelExpressionTagHelper.cshtml) - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper, Microsoft.AspNetCore.Mvc.Razor.Extensions.Test DirectiveToken - (33:2,14 [29] ModelExpressionTagHelper.cshtml) - "InputTestTagHelper, AppCode"
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null; RazorIRToken - - CSharp - private static System.Object __o = null;
DeclareTagHelperFields - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper DeclareTagHelperFields - - InputTestTagHelper
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (17:1,0 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (17:1,0 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (17:1,0 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (17:1,0 [2] ModelExpressionTagHelper.cshtml) - Html - \n
HtmlContent - (141:2,122 [4] ModelExpressionTagHelper.cshtml) HtmlContent - (62:2,43 [4] ModelExpressionTagHelper.cshtml)
RazorIRToken - (141:2,122 [4] ModelExpressionTagHelper.cshtml) - Html - \n\n RazorIRToken - (62:2,43 [4] ModelExpressionTagHelper.cshtml) - Html - \n\n
TagHelper - (145:4,0 [24] ModelExpressionTagHelper.cshtml) TagHelper - (66:4,0 [25] ModelExpressionTagHelper.cshtml)
InitializeTagHelperStructure - - input-test - TagMode.SelfClosing InitializeTagHelperStructure - - input-test - TagMode.SelfClosing
CreateTagHelper - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper CreateTagHelper - - InputTestTagHelper
SetTagHelperProperty - (162:4,17 [3] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes SetTagHelperProperty - (83:4,17 [4] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes
CSharpExpression - CSharpExpression -
RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model => RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model =>
RazorIRToken - - CSharp - __model. RazorIRToken - - CSharp - __model.
RazorIRToken - (162:4,17 [3] ModelExpressionTagHelper.cshtml) - CSharp - Now RazorIRToken - (83:4,17 [4] ModelExpressionTagHelper.cshtml) - CSharp - Date
RazorIRToken - - CSharp - ) RazorIRToken - - CSharp - )
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (169:4,24 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (91:4,25 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (169:4,24 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (91:4,25 [2] ModelExpressionTagHelper.cshtml) - Html - \n
TagHelper - (171:5,0 [27] ModelExpressionTagHelper.cshtml) TagHelper - (93:5,0 [27] ModelExpressionTagHelper.cshtml)
InitializeTagHelperStructure - - input-test - TagMode.SelfClosing InitializeTagHelperStructure - - input-test - TagMode.SelfClosing
CreateTagHelper - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper CreateTagHelper - - InputTestTagHelper
SetTagHelperProperty - (188:5,17 [6] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes SetTagHelperProperty - (110:5,17 [6] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes
CSharpExpression - CSharpExpression -
RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model => RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model =>
RazorIRToken - (189:5,18 [5] ModelExpressionTagHelper.cshtml) - CSharp - Model RazorIRToken - (111:5,18 [5] ModelExpressionTagHelper.cshtml) - CSharp - Model
RazorIRToken - - CSharp - ) RazorIRToken - - CSharp - )
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (198:5,27 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (120:5,27 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (198:5,27 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (120:5,27 [2] ModelExpressionTagHelper.cshtml) - Html - \n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "55aa7d9113d1666f0c8e05c6ad9b86fc8464b277" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0906a816db301fe624bbe5a96c4b3013071ea492"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
@ -29,28 +29,28 @@ namespace AspNetCore
return __backed__tagHelperScopeManager; return __backed__tagHelperScopeManager;
} }
} }
private global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = null; private global::InputTestTagHelper __InputTestTagHelper = null;
#pragma warning disable 1998 #pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync() public async override global::System.Threading.Tasks.Task ExecuteAsync()
{ {
BeginContext(17, 2, true); BeginContext(17, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
BeginContext(143, 2, true); BeginContext(64, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper>(); __InputTestTagHelper = CreateTagHelper<global::InputTestTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper); __tagHelperExecutionContext.Add(__InputTestTagHelper);
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" #line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Now); __InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Date);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); __tagHelperExecutionContext.AddTagHelperAttribute("for", __InputTestTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginContext(145, 24, false); BeginContext(66, 25, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -59,21 +59,21 @@ __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpres
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(169, 2, true); BeginContext(91, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
} }
); );
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper>(); __InputTestTagHelper = CreateTagHelper<global::InputTestTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper); __tagHelperExecutionContext.Add(__InputTestTagHelper);
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml" #line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => Model); __InputTestTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => Model);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes); __tagHelperExecutionContext.AddTagHelperAttribute("for", __InputTestTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginContext(171, 27, false); BeginContext(93, 27, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -82,7 +82,7 @@ __Microsoft_AspNetCore_Mvc_Razor_Extensions_InputTestTagHelper.For = ModelExpres
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(198, 2, true); BeginContext(120, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
} }

View File

@ -9,7 +9,7 @@ Document -
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime> - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<DateTime> -
DeclareTagHelperFields - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper DeclareTagHelperFields - - InputTestTagHelper
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(17, 2, true); RazorIRToken - - CSharp - BeginContext(17, 2, true);
@ -18,48 +18,48 @@ Document -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(143, 2, true); RazorIRToken - - CSharp - BeginContext(64, 2, true);
HtmlContent - (143:3,0 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (64:3,0 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (143:3,0 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (64:3,0 [2] ModelExpressionTagHelper.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (145:4,0 [24] ModelExpressionTagHelper.cshtml) TagHelper - (66:4,0 [25] ModelExpressionTagHelper.cshtml)
InitializeTagHelperStructure - - input-test - TagMode.SelfClosing InitializeTagHelperStructure - - input-test - TagMode.SelfClosing
CreateTagHelper - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper CreateTagHelper - - InputTestTagHelper
SetTagHelperProperty - (162:4,17 [3] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes SetTagHelperProperty - (83:4,17 [4] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes
CSharpExpression - CSharpExpression -
RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model => RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model =>
RazorIRToken - - CSharp - __model. RazorIRToken - - CSharp - __model.
RazorIRToken - (162:4,17 [3] ModelExpressionTagHelper.cshtml) - CSharp - Now RazorIRToken - (83:4,17 [4] ModelExpressionTagHelper.cshtml) - CSharp - Date
RazorIRToken - - CSharp - ) RazorIRToken - - CSharp - )
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(145, 24, false); RazorIRToken - - CSharp - BeginContext(66, 25, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(169, 2, true); RazorIRToken - - CSharp - BeginContext(91, 2, true);
HtmlContent - (169:4,24 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (91:4,25 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (169:4,24 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (91:4,25 [2] ModelExpressionTagHelper.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (171:5,0 [27] ModelExpressionTagHelper.cshtml) TagHelper - (93:5,0 [27] ModelExpressionTagHelper.cshtml)
InitializeTagHelperStructure - - input-test - TagMode.SelfClosing InitializeTagHelperStructure - - input-test - TagMode.SelfClosing
CreateTagHelper - - Microsoft.AspNetCore.Mvc.Razor.Extensions.InputTestTagHelper CreateTagHelper - - InputTestTagHelper
SetTagHelperProperty - (188:5,17 [6] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes SetTagHelperProperty - (110:5,17 [6] ModelExpressionTagHelper.cshtml) - for - For - HtmlAttributeValueStyle.DoubleQuotes
CSharpExpression - CSharpExpression -
RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model => RazorIRToken - - CSharp - ModelExpressionProvider.CreateModelExpression(ViewData, __model =>
RazorIRToken - (189:5,18 [5] ModelExpressionTagHelper.cshtml) - CSharp - Model RazorIRToken - (111:5,18 [5] ModelExpressionTagHelper.cshtml) - CSharp - Model
RazorIRToken - - CSharp - ) RazorIRToken - - CSharp - )
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(171, 27, false); RazorIRToken - - CSharp - BeginContext(93, 27, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(198, 2, true); RazorIRToken - - CSharp - BeginContext(120, 2, true);
HtmlContent - (198:5,27 [2] ModelExpressionTagHelper.cshtml) HtmlContent - (120:5,27 [2] ModelExpressionTagHelper.cshtml)
RazorIRToken - (198:5,27 [2] ModelExpressionTagHelper.cshtml) - Html - \n RazorIRToken - (120:5,27 [2] ModelExpressionTagHelper.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
InjectDirective - InjectDirective -

View File

@ -14,7 +14,7 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
System.Collections.IEnumerable __typeHelper = null; System.Collections.IEnumerable __typeHelper = default(System.Collections.IEnumerable);
} }
))(); ))();
} }

View File

@ -1,5 +1,5 @@
Source Location: (7:0,7 [30] /TestFiles/Input/Model.cshtml) Source Location: (7:0,7 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model.cshtml)
|System.Collections.IEnumerable| |System.Collections.IEnumerable|
Generated Location: (612:16,0 [30] ) Generated Location: (643:16,0 [30] )
|System.Collections.IEnumerable| |System.Collections.IEnumerable|

View File

@ -14,11 +14,11 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
ThisShouldBeGenerated __typeHelper = null; ThisShouldBeGenerated __typeHelper = default(ThisShouldBeGenerated);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
System.Collections.IEnumerable __typeHelper = null; System.Collections.IEnumerable __typeHelper = default(System.Collections.IEnumerable);
} }
))(); ))();
} }

View File

@ -1,10 +1,10 @@
Source Location: (7:0,7 [21] /TestFiles/Input/MultipleModels.cshtml) Source Location: (7:0,7 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MultipleModels.cshtml)
|ThisShouldBeGenerated| |ThisShouldBeGenerated|
Generated Location: (621:16,0 [21] ) Generated Location: (652:16,0 [21] )
|ThisShouldBeGenerated| |ThisShouldBeGenerated|
Source Location: (37:1,7 [30] /TestFiles/Input/MultipleModels.cshtml) Source Location: (37:1,7 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MultipleModels.cshtml)
|System.Collections.IEnumerable| |System.Collections.IEnumerable|
Generated Location: (725:20,0 [30] ) Generated Location: (782:20,0 [30] )
|System.Collections.IEnumerable| |System.Collections.IEnumerable|

View File

@ -0,0 +1,5 @@
Source Location: (18:1,11 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace.cshtml)
|Test.Namespace|
Generated Location: (612:16,44 [14] )
|Test.Namespace|

View File

@ -1,7 +1,7 @@
@page @page
@model NewModel @model NewModel
@addTagHelper "*, TestAssembly" @addTagHelper "*, AppCode"
@using Microsoft.AspNetCore.Mvc.RazorPages @using Microsoft.AspNetCore.Mvc.RazorPages
@functions { @functions {
@ -26,7 +26,7 @@
<form method="post" class="form-horizontal" > <form method="post" class="form-horizontal" >
<div class="text-danger"></div> <div class="text-danger"></div>
<div class="form-group"> <div class="form-group">
<label class="col-md-2 control-label">@Name</label> <label class="col-md-2 control-label">@Model.Name</label>
<div class="col-md-10"> <div class="col-md-10">
<input class="form-control" /> <input class="form-control" />
<span class="text-danger"></span> <span class="text-danger"></span>

View File

@ -1,6 +1,6 @@
@page @page
@addTagHelper "*, TestAssembly" @addTagHelper "*, AppCode"
@using Microsoft.AspNetCore.Mvc.RazorPages @using Microsoft.AspNetCore.Mvc.RazorPages
@functions { @functions {

View File

@ -19,7 +19,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
global::System.Object __typeHelper = "*, TestAssembly"; global::System.Object __typeHelper = "*, AppCode";
} }
))(); ))();
} }

View File

@ -9,7 +9,7 @@ Document -
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (43:3,1 [41] RazorPagesWithoutModel.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages UsingStatement - (38:3,1 [41] RazorPagesWithoutModel.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
DesignTimeDirective - DesignTimeDirective -
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
@ -25,109 +25,109 @@ Document -
DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (617:12,14 [96] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (23:2,14 [17] RazorPagesWithoutModel.cshtml) - "*, TestAssembly" DirectiveToken - (23:2,14 [12] RazorPagesWithoutModel.cshtml) - "*, AppCode"
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null; RazorIRToken - - CSharp - private static System.Object __o = null;
DeclareTagHelperFields - - DivTagHelper DeclareTagHelperFields - - DivTagHelper
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (7:1,0 [2] RazorPagesWithoutModel.cshtml) HtmlContent - (7:1,0 [2] RazorPagesWithoutModel.cshtml)
RazorIRToken - (7:1,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (7:1,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n
HtmlContent - (40:2,31 [2] RazorPagesWithoutModel.cshtml) HtmlContent - (35:2,26 [2] RazorPagesWithoutModel.cshtml)
RazorIRToken - (40:2,31 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (35:2,26 [2] RazorPagesWithoutModel.cshtml) - Html - \n
HtmlContent - (84:3,42 [4] RazorPagesWithoutModel.cshtml) HtmlContent - (79:3,42 [4] RazorPagesWithoutModel.cshtml)
RazorIRToken - (84:3,42 [4] RazorPagesWithoutModel.cshtml) - Html - \n\n RazorIRToken - (79:3,42 [4] RazorPagesWithoutModel.cshtml) - Html - \n\n
HtmlContent - (384:18,1 [77] RazorPagesWithoutModel.cshtml) HtmlContent - (379:18,1 [77] RazorPagesWithoutModel.cshtml)
RazorIRToken - (384:18,1 [4] RazorPagesWithoutModel.cshtml) - Html - \n\n RazorIRToken - (379:18,1 [4] RazorPagesWithoutModel.cshtml) - Html - \n\n
RazorIRToken - (388:20,0 [4] RazorPagesWithoutModel.cshtml) - Html - <h1> RazorIRToken - (383:20,0 [4] RazorPagesWithoutModel.cshtml) - Html - <h1>
RazorIRToken - (392:20,4 [12] RazorPagesWithoutModel.cshtml) - Html - New Customer RazorIRToken - (387:20,4 [12] RazorPagesWithoutModel.cshtml) - Html - New Customer
RazorIRToken - (404:20,16 [5] RazorPagesWithoutModel.cshtml) - Html - </h1> RazorIRToken - (399:20,16 [5] RazorPagesWithoutModel.cshtml) - Html - </h1>
RazorIRToken - (409:20,21 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (404:20,21 [2] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (411:21,0 [5] RazorPagesWithoutModel.cshtml) - Html - <form RazorIRToken - (406:21,0 [5] RazorPagesWithoutModel.cshtml) - Html - <form
RazorIRToken - (416:21,5 [14] RazorPagesWithoutModel.cshtml) - Html - method="post" RazorIRToken - (411:21,5 [14] RazorPagesWithoutModel.cshtml) - Html - method="post"
RazorIRToken - (430:21,19 [24] RazorPagesWithoutModel.cshtml) - Html - class="form-horizontal" RazorIRToken - (425:21,19 [24] RazorPagesWithoutModel.cshtml) - Html - class="form-horizontal"
RazorIRToken - (454:21,43 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (449:21,43 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (455:21,44 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (450:21,44 [6] RazorPagesWithoutModel.cshtml) - Html - \n
TagHelper - (461:22,4 [31] RazorPagesWithoutModel.cshtml) TagHelper - (456:22,4 [31] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (473:22,16 [11] RazorPagesWithoutModel.cshtml) HtmlContent - (468:22,16 [11] RazorPagesWithoutModel.cshtml)
RazorIRToken - (473:22,16 [11] RazorPagesWithoutModel.cshtml) - Html - text-danger RazorIRToken - (468:22,16 [11] RazorPagesWithoutModel.cshtml) - Html - text-danger
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (492:22,35 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (487:22,35 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (492:22,35 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (487:22,35 [6] RazorPagesWithoutModel.cshtml) - Html - \n
TagHelper - (498:23,4 [237] RazorPagesWithoutModel.cshtml) TagHelper - (493:23,4 [237] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (522:23,28 [48] RazorPagesWithoutModel.cshtml) HtmlContent - (517:23,28 [48] RazorPagesWithoutModel.cshtml)
RazorIRToken - (522:23,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (517:23,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (532:24,8 [6] RazorPagesWithoutModel.cshtml) - Html - <label RazorIRToken - (527:24,8 [6] RazorPagesWithoutModel.cshtml) - Html - <label
RazorIRToken - (538:24,14 [31] RazorPagesWithoutModel.cshtml) - Html - class="col-md-2 control-label" RazorIRToken - (533:24,14 [31] RazorPagesWithoutModel.cshtml) - Html - class="col-md-2 control-label"
RazorIRToken - (569:24,45 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (564:24,45 [1] RazorPagesWithoutModel.cshtml) - Html - >
CSharpExpression - (571:24,47 [4] RazorPagesWithoutModel.cshtml) CSharpExpression - (566:24,47 [4] RazorPagesWithoutModel.cshtml)
RazorIRToken - (571:24,47 [4] RazorPagesWithoutModel.cshtml) - CSharp - Name RazorIRToken - (566:24,47 [4] RazorPagesWithoutModel.cshtml) - CSharp - Name
HtmlContent - (575:24,51 [18] RazorPagesWithoutModel.cshtml) HtmlContent - (570:24,51 [18] RazorPagesWithoutModel.cshtml)
RazorIRToken - (575:24,51 [8] RazorPagesWithoutModel.cshtml) - Html - </label> RazorIRToken - (570:24,51 [8] RazorPagesWithoutModel.cshtml) - Html - </label>
RazorIRToken - (583:24,59 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (578:24,59 [10] RazorPagesWithoutModel.cshtml) - Html - \n
TagHelper - (593:25,8 [130] RazorPagesWithoutModel.cshtml) TagHelper - (588:25,8 [130] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (616:25,31 [101] RazorPagesWithoutModel.cshtml) HtmlContent - (611:25,31 [101] RazorPagesWithoutModel.cshtml)
RazorIRToken - (616:25,31 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (611:25,31 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (630:26,12 [6] RazorPagesWithoutModel.cshtml) - Html - <input RazorIRToken - (625:26,12 [6] RazorPagesWithoutModel.cshtml) - Html - <input
RazorIRToken - (636:26,18 [21] RazorPagesWithoutModel.cshtml) - Html - class="form-control" RazorIRToken - (631:26,18 [21] RazorPagesWithoutModel.cshtml) - Html - class="form-control"
RazorIRToken - (657:26,39 [3] RazorPagesWithoutModel.cshtml) - Html - /> RazorIRToken - (652:26,39 [3] RazorPagesWithoutModel.cshtml) - Html - />
RazorIRToken - (660:26,42 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (655:26,42 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (674:27,12 [5] RazorPagesWithoutModel.cshtml) - Html - <span RazorIRToken - (669:27,12 [5] RazorPagesWithoutModel.cshtml) - Html - <span
RazorIRToken - (679:27,17 [20] RazorPagesWithoutModel.cshtml) - Html - class="text-danger" RazorIRToken - (674:27,17 [20] RazorPagesWithoutModel.cshtml) - Html - class="text-danger"
RazorIRToken - (699:27,37 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (694:27,37 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (700:27,38 [7] RazorPagesWithoutModel.cshtml) - Html - </span> RazorIRToken - (695:27,38 [7] RazorPagesWithoutModel.cshtml) - Html - </span>
RazorIRToken - (707:27,45 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (702:27,45 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (605:25,20 [9] RazorPagesWithoutModel.cshtml) HtmlContent - (600:25,20 [9] RazorPagesWithoutModel.cshtml)
RazorIRToken - (605:25,20 [9] RazorPagesWithoutModel.cshtml) - Html - col-md-10 RazorIRToken - (600:25,20 [9] RazorPagesWithoutModel.cshtml) - Html - col-md-10
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (723:28,14 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (718:28,14 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (723:28,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (718:28,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (510:23,16 [10] RazorPagesWithoutModel.cshtml) HtmlContent - (505:23,16 [10] RazorPagesWithoutModel.cshtml)
RazorIRToken - (510:23,16 [10] RazorPagesWithoutModel.cshtml) - Html - form-group RazorIRToken - (505:23,16 [10] RazorPagesWithoutModel.cshtml) - Html - form-group
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (735:29,10 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (730:29,10 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (735:29,10 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (730:29,10 [6] RazorPagesWithoutModel.cshtml) - Html - \n
TagHelper - (741:30,4 [174] RazorPagesWithoutModel.cshtml) TagHelper - (736:30,4 [174] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (765:30,28 [10] RazorPagesWithoutModel.cshtml) HtmlContent - (760:30,28 [10] RazorPagesWithoutModel.cshtml)
RazorIRToken - (765:30,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (760:30,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n
TagHelper - (775:31,8 [128] RazorPagesWithoutModel.cshtml) TagHelper - (770:31,8 [128] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (814:31,47 [83] RazorPagesWithoutModel.cshtml) HtmlContent - (809:31,47 [83] RazorPagesWithoutModel.cshtml)
RazorIRToken - (814:31,47 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (809:31,47 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (828:32,12 [7] RazorPagesWithoutModel.cshtml) - Html - <button RazorIRToken - (823:32,12 [7] RazorPagesWithoutModel.cshtml) - Html - <button
RazorIRToken - (835:32,19 [14] RazorPagesWithoutModel.cshtml) - Html - type="submit" RazorIRToken - (830:32,19 [14] RazorPagesWithoutModel.cshtml) - Html - type="submit"
RazorIRToken - (849:32,33 [24] RazorPagesWithoutModel.cshtml) - Html - class="btn btn-primary" RazorIRToken - (844:32,33 [24] RazorPagesWithoutModel.cshtml) - Html - class="btn btn-primary"
RazorIRToken - (873:32,57 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (868:32,57 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (874:32,58 [4] RazorPagesWithoutModel.cshtml) - Html - Save RazorIRToken - (869:32,58 [4] RazorPagesWithoutModel.cshtml) - Html - Save
RazorIRToken - (878:32,62 [9] RazorPagesWithoutModel.cshtml) - Html - </button> RazorIRToken - (873:32,62 [9] RazorPagesWithoutModel.cshtml) - Html - </button>
RazorIRToken - (887:32,71 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (882:32,71 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (787:31,20 [25] RazorPagesWithoutModel.cshtml) HtmlContent - (782:31,20 [25] RazorPagesWithoutModel.cshtml)
RazorIRToken - (787:31,20 [25] RazorPagesWithoutModel.cshtml) - Html - col-md-offset-2 col-md-10 RazorIRToken - (782:31,20 [25] RazorPagesWithoutModel.cshtml) - Html - col-md-offset-2 col-md-10
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (903:33,14 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (898:33,14 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (903:33,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (898:33,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (753:30,16 [10] RazorPagesWithoutModel.cshtml) HtmlContent - (748:30,16 [10] RazorPagesWithoutModel.cshtml)
RazorIRToken - (753:30,16 [10] RazorPagesWithoutModel.cshtml) - Html - form-group RazorIRToken - (748:30,16 [10] RazorPagesWithoutModel.cshtml) - Html - form-group
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (915:34,10 [11] RazorPagesWithoutModel.cshtml) HtmlContent - (910:34,10 [11] RazorPagesWithoutModel.cshtml)
RazorIRToken - (915:34,10 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (910:34,10 [2] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (917:35,0 [7] RazorPagesWithoutModel.cshtml) - Html - </form> RazorIRToken - (912:35,0 [7] RazorPagesWithoutModel.cshtml) - Html - </form>
RazorIRToken - (924:35,7 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (919:35,7 [2] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - (100:5,12 [283] RazorPagesWithoutModel.cshtml) CSharpStatement - (95:5,12 [283] RazorPagesWithoutModel.cshtml)
RazorIRToken - (100:5,12 [283] RazorPagesWithoutModel.cshtml) - CSharp - \n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n RazorIRToken - (95:5,12 [283] RazorPagesWithoutModel.cshtml) - CSharp - \n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,19 +1,19 @@
Source Location: (43:3,1 [41] /TestFiles/Input/RazorPagesWithoutModel.cshtml) Source Location: (38:3,1 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml)
|using Microsoft.AspNetCore.Mvc.RazorPages| |using Microsoft.AspNetCore.Mvc.RazorPages|
Generated Location: (420:12,0 [41] ) Generated Location: (435:12,0 [41] )
|using Microsoft.AspNetCore.Mvc.RazorPages| |using Microsoft.AspNetCore.Mvc.RazorPages|
Source Location: (23:2,14 [17] /TestFiles/Input/RazorPagesWithoutModel.cshtml) Source Location: (23:2,14 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml)
|"*, TestAssembly"| |"*, AppCode"|
Generated Location: (783:21,37 [17] ) Generated Location: (838:21,37 [12] )
|"*, TestAssembly"| |"*, AppCode"|
Source Location: (571:24,47 [4] /TestFiles/Input/RazorPagesWithoutModel.cshtml) Source Location: (566:24,47 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml)
|Name| |Name|
Generated Location: (1296:33,47 [4] ) Generated Location: (1386:33,47 [4] )
|Name| |Name|
Source Location: (100:5,12 [283] /TestFiles/Input/RazorPagesWithoutModel.cshtml) Source Location: (95:5,12 [283] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml)
| |
public IActionResult OnPost(Customer customer) public IActionResult OnPost(Customer customer)
{ {
@ -28,7 +28,7 @@ Source Location: (100:5,12 [283] /TestFiles/Input/RazorPagesWithoutModel.cshtml)
public string Name { get; set; } public string Name { get; set; }
} }
| |
Generated Location: (1737:44,12 [283] ) Generated Location: (1867:44,12 [283] )
| |
public IActionResult OnPost(Customer customer) public IActionResult OnPost(Customer customer)
{ {

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c933419e57888c980327bbedf321c46e65488378" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c0587249e6e0b7ba4e1efc463f58577d5d0b6ae2"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
@ -45,10 +45,10 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
BeginContext(7, 2, true); BeginContext(7, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
BeginContext(86, 2, true); BeginContext(81, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
BeginContext(386, 75, true); BeginContext(381, 75, true);
WriteLiteral("\r\n<h1>New Customer</h1>\r\n<form method=\"post\" class=\"form-horizontal\">\r\n "); WriteLiteral("\r\n<h1>New Customer</h1>\r\n<form method=\"post\" class=\"form-horizontal\">\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
@ -57,7 +57,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
BeginContext(461, 31, false); BeginContext(456, 31, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -66,25 +66,25 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(492, 6, true); BeginContext(487, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(522, 48, true); BeginContext(517, 48, true);
WriteLiteral("\r\n <label class=\"col-md-2 control-label\">"); WriteLiteral("\r\n <label class=\"col-md-2 control-label\">");
EndContext(); EndContext();
BeginContext(571, 4, false); BeginContext(566, 4, false);
#line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml" #line 25 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml"
Write(Name); Write(Name);
#line default #line default
#line hidden #line hidden
EndContext(); EndContext();
BeginContext(575, 18, true); BeginContext(570, 18, true);
WriteLiteral("</label>\r\n "); WriteLiteral("</label>\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(616, 101, true); BeginContext(611, 101, true);
WriteLiteral("\r\n <input class=\"form-control\" />\r\n <span class=\"text-danger\"></span>\r\n "); WriteLiteral("\r\n <input class=\"form-control\" />\r\n <span class=\"text-danger\"></span>\r\n ");
EndContext(); EndContext();
} }
@ -92,7 +92,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
BeginContext(593, 130, false); BeginContext(588, 130, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -101,7 +101,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(723, 6, true); BeginContext(718, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
} }
@ -109,7 +109,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
BeginContext(498, 237, false); BeginContext(493, 237, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -118,15 +118,15 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(735, 6, true); BeginContext(730, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(765, 10, true); BeginContext(760, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(814, 83, true); BeginContext(809, 83, true);
WriteLiteral("\r\n <button type=\"submit\" class=\"btn btn-primary\">Save</button>\r\n "); WriteLiteral("\r\n <button type=\"submit\" class=\"btn btn-primary\">Save</button>\r\n ");
EndContext(); EndContext();
} }
@ -134,7 +134,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
BeginContext(775, 128, false); BeginContext(770, 128, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -143,7 +143,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(903, 6, true); BeginContext(898, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
} }
@ -151,7 +151,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
BeginContext(741, 174, false); BeginContext(736, 174, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -160,7 +160,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(915, 11, true); BeginContext(910, 11, true);
WriteLiteral("\r\n</form>\r\n"); WriteLiteral("\r\n</form>\r\n");
EndContext(); EndContext();
} }

View File

@ -8,7 +8,7 @@ Document -
UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (43:3,1 [43] RazorPagesWithoutModel.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages UsingStatement - (38:3,1 [43] RazorPagesWithoutModel.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes
@ -23,161 +23,161 @@ Document -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(86, 2, true); RazorIRToken - - CSharp - BeginContext(81, 2, true);
HtmlContent - (86:4,0 [2] RazorPagesWithoutModel.cshtml) HtmlContent - (81:4,0 [2] RazorPagesWithoutModel.cshtml)
RazorIRToken - (86:4,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (81:4,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(386, 75, true); RazorIRToken - - CSharp - BeginContext(381, 75, true);
HtmlContent - (386:19,0 [75] RazorPagesWithoutModel.cshtml) HtmlContent - (381:19,0 [75] RazorPagesWithoutModel.cshtml)
RazorIRToken - (386:19,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (381:19,0 [2] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (388:20,0 [4] RazorPagesWithoutModel.cshtml) - Html - <h1> RazorIRToken - (383:20,0 [4] RazorPagesWithoutModel.cshtml) - Html - <h1>
RazorIRToken - (392:20,4 [12] RazorPagesWithoutModel.cshtml) - Html - New Customer RazorIRToken - (387:20,4 [12] RazorPagesWithoutModel.cshtml) - Html - New Customer
RazorIRToken - (404:20,16 [5] RazorPagesWithoutModel.cshtml) - Html - </h1> RazorIRToken - (399:20,16 [5] RazorPagesWithoutModel.cshtml) - Html - </h1>
RazorIRToken - (409:20,21 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (404:20,21 [2] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (411:21,0 [5] RazorPagesWithoutModel.cshtml) - Html - <form RazorIRToken - (406:21,0 [5] RazorPagesWithoutModel.cshtml) - Html - <form
RazorIRToken - (416:21,5 [14] RazorPagesWithoutModel.cshtml) - Html - method="post" RazorIRToken - (411:21,5 [14] RazorPagesWithoutModel.cshtml) - Html - method="post"
RazorIRToken - (430:21,19 [24] RazorPagesWithoutModel.cshtml) - Html - class="form-horizontal" RazorIRToken - (425:21,19 [24] RazorPagesWithoutModel.cshtml) - Html - class="form-horizontal"
RazorIRToken - (454:21,43 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (449:21,43 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (455:21,44 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (450:21,44 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (461:22,4 [31] RazorPagesWithoutModel.cshtml) TagHelper - (456:22,4 [31] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(461, 31, false); RazorIRToken - - CSharp - BeginContext(456, 31, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(492, 6, true); RazorIRToken - - CSharp - BeginContext(487, 6, true);
HtmlContent - (492:22,35 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (487:22,35 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (492:22,35 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (487:22,35 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (498:23,4 [237] RazorPagesWithoutModel.cshtml) TagHelper - (493:23,4 [237] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(522, 48, true); RazorIRToken - - CSharp - BeginContext(517, 48, true);
HtmlContent - (522:23,28 [48] RazorPagesWithoutModel.cshtml) HtmlContent - (517:23,28 [48] RazorPagesWithoutModel.cshtml)
RazorIRToken - (522:23,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (517:23,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (532:24,8 [6] RazorPagesWithoutModel.cshtml) - Html - <label RazorIRToken - (527:24,8 [6] RazorPagesWithoutModel.cshtml) - Html - <label
RazorIRToken - (538:24,14 [31] RazorPagesWithoutModel.cshtml) - Html - class="col-md-2 control-label" RazorIRToken - (533:24,14 [31] RazorPagesWithoutModel.cshtml) - Html - class="col-md-2 control-label"
RazorIRToken - (569:24,45 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (564:24,45 [1] RazorPagesWithoutModel.cshtml) - Html - >
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(571, 4, false); RazorIRToken - - CSharp - BeginContext(566, 4, false);
CSharpExpression - (571:24,47 [4] RazorPagesWithoutModel.cshtml) CSharpExpression - (566:24,47 [4] RazorPagesWithoutModel.cshtml)
RazorIRToken - (571:24,47 [4] RazorPagesWithoutModel.cshtml) - CSharp - Name RazorIRToken - (566:24,47 [4] RazorPagesWithoutModel.cshtml) - CSharp - Name
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(575, 18, true); RazorIRToken - - CSharp - BeginContext(570, 18, true);
HtmlContent - (575:24,51 [18] RazorPagesWithoutModel.cshtml) HtmlContent - (570:24,51 [18] RazorPagesWithoutModel.cshtml)
RazorIRToken - (575:24,51 [8] RazorPagesWithoutModel.cshtml) - Html - </label> RazorIRToken - (570:24,51 [8] RazorPagesWithoutModel.cshtml) - Html - </label>
RazorIRToken - (583:24,59 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (578:24,59 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (593:25,8 [130] RazorPagesWithoutModel.cshtml) TagHelper - (588:25,8 [130] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(616, 101, true); RazorIRToken - - CSharp - BeginContext(611, 101, true);
HtmlContent - (616:25,31 [101] RazorPagesWithoutModel.cshtml) HtmlContent - (611:25,31 [101] RazorPagesWithoutModel.cshtml)
RazorIRToken - (616:25,31 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (611:25,31 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (630:26,12 [6] RazorPagesWithoutModel.cshtml) - Html - <input RazorIRToken - (625:26,12 [6] RazorPagesWithoutModel.cshtml) - Html - <input
RazorIRToken - (636:26,18 [21] RazorPagesWithoutModel.cshtml) - Html - class="form-control" RazorIRToken - (631:26,18 [21] RazorPagesWithoutModel.cshtml) - Html - class="form-control"
RazorIRToken - (657:26,39 [3] RazorPagesWithoutModel.cshtml) - Html - /> RazorIRToken - (652:26,39 [3] RazorPagesWithoutModel.cshtml) - Html - />
RazorIRToken - (660:26,42 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (655:26,42 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (674:27,12 [5] RazorPagesWithoutModel.cshtml) - Html - <span RazorIRToken - (669:27,12 [5] RazorPagesWithoutModel.cshtml) - Html - <span
RazorIRToken - (679:27,17 [20] RazorPagesWithoutModel.cshtml) - Html - class="text-danger" RazorIRToken - (674:27,17 [20] RazorPagesWithoutModel.cshtml) - Html - class="text-danger"
RazorIRToken - (699:27,37 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (694:27,37 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (700:27,38 [7] RazorPagesWithoutModel.cshtml) - Html - </span> RazorIRToken - (695:27,38 [7] RazorPagesWithoutModel.cshtml) - Html - </span>
RazorIRToken - (707:27,45 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (702:27,45 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(593, 130, false); RazorIRToken - - CSharp - BeginContext(588, 130, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(723, 6, true); RazorIRToken - - CSharp - BeginContext(718, 6, true);
HtmlContent - (723:28,14 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (718:28,14 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (723:28,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (718:28,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(498, 237, false); RazorIRToken - - CSharp - BeginContext(493, 237, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(735, 6, true); RazorIRToken - - CSharp - BeginContext(730, 6, true);
HtmlContent - (735:29,10 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (730:29,10 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (735:29,10 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (730:29,10 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (741:30,4 [174] RazorPagesWithoutModel.cshtml) TagHelper - (736:30,4 [174] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(765, 10, true); RazorIRToken - - CSharp - BeginContext(760, 10, true);
HtmlContent - (765:30,28 [10] RazorPagesWithoutModel.cshtml) HtmlContent - (760:30,28 [10] RazorPagesWithoutModel.cshtml)
RazorIRToken - (765:30,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (760:30,28 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (775:31,8 [128] RazorPagesWithoutModel.cshtml) TagHelper - (770:31,8 [128] RazorPagesWithoutModel.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(814, 83, true); RazorIRToken - - CSharp - BeginContext(809, 83, true);
HtmlContent - (814:31,47 [83] RazorPagesWithoutModel.cshtml) HtmlContent - (809:31,47 [83] RazorPagesWithoutModel.cshtml)
RazorIRToken - (814:31,47 [14] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (809:31,47 [14] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (828:32,12 [7] RazorPagesWithoutModel.cshtml) - Html - <button RazorIRToken - (823:32,12 [7] RazorPagesWithoutModel.cshtml) - Html - <button
RazorIRToken - (835:32,19 [14] RazorPagesWithoutModel.cshtml) - Html - type="submit" RazorIRToken - (830:32,19 [14] RazorPagesWithoutModel.cshtml) - Html - type="submit"
RazorIRToken - (849:32,33 [24] RazorPagesWithoutModel.cshtml) - Html - class="btn btn-primary" RazorIRToken - (844:32,33 [24] RazorPagesWithoutModel.cshtml) - Html - class="btn btn-primary"
RazorIRToken - (873:32,57 [1] RazorPagesWithoutModel.cshtml) - Html - > RazorIRToken - (868:32,57 [1] RazorPagesWithoutModel.cshtml) - Html - >
RazorIRToken - (874:32,58 [4] RazorPagesWithoutModel.cshtml) - Html - Save RazorIRToken - (869:32,58 [4] RazorPagesWithoutModel.cshtml) - Html - Save
RazorIRToken - (878:32,62 [9] RazorPagesWithoutModel.cshtml) - Html - </button> RazorIRToken - (873:32,62 [9] RazorPagesWithoutModel.cshtml) - Html - </button>
RazorIRToken - (887:32,71 [10] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (882:32,71 [10] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(775, 128, false); RazorIRToken - - CSharp - BeginContext(770, 128, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(903, 6, true); RazorIRToken - - CSharp - BeginContext(898, 6, true);
HtmlContent - (903:33,14 [6] RazorPagesWithoutModel.cshtml) HtmlContent - (898:33,14 [6] RazorPagesWithoutModel.cshtml)
RazorIRToken - (903:33,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (898:33,14 [6] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(741, 174, false); RazorIRToken - - CSharp - BeginContext(736, 174, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(915, 11, true); RazorIRToken - - CSharp - BeginContext(910, 11, true);
HtmlContent - (915:34,10 [11] RazorPagesWithoutModel.cshtml) HtmlContent - (910:34,10 [11] RazorPagesWithoutModel.cshtml)
RazorIRToken - (915:34,10 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (910:34,10 [2] RazorPagesWithoutModel.cshtml) - Html - \n
RazorIRToken - (917:35,0 [7] RazorPagesWithoutModel.cshtml) - Html - </form> RazorIRToken - (912:35,0 [7] RazorPagesWithoutModel.cshtml) - Html - </form>
RazorIRToken - (924:35,7 [2] RazorPagesWithoutModel.cshtml) - Html - \n RazorIRToken - (919:35,7 [2] RazorPagesWithoutModel.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - (100:5,12 [283] RazorPagesWithoutModel.cshtml) CSharpStatement - (95:5,12 [283] RazorPagesWithoutModel.cshtml)
RazorIRToken - (100:5,12 [283] RazorPagesWithoutModel.cshtml) - CSharp - \n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n RazorIRToken - (95:5,12 [283] RazorPagesWithoutModel.cshtml) - CSharp - \n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -19,11 +19,11 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
NewModel __typeHelper = null; NewModel __typeHelper = default(NewModel);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {
global::System.Object __typeHelper = "*, TestAssembly"; global::System.Object __typeHelper = "*, AppCode";
} }
))(); ))();
} }
@ -35,7 +35,7 @@ global::System.Object __typeHelper = "*, TestAssembly";
{ {
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" #line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml"
__o = Name; __o = Model.Name;
#line default #line default
#line hidden #line hidden

View File

@ -9,7 +9,7 @@ Document -
UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (60:4,1 [41] RazorPages.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages UsingStatement - (55:4,1 [41] RazorPages.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
DesignTimeDirective - DesignTimeDirective -
DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> DirectiveToken - (231:7,8 [62] ) - global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel>
@ -26,109 +26,109 @@ Document -
DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (729:13,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.HeadTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor DirectiveToken - (832:14,14 [87] ) - Microsoft.AspNetCore.Mvc.Razor.TagHelpers.BodyTagHelper, Microsoft.AspNetCore.Mvc.Razor
DirectiveToken - (16:2,7 [8] RazorPages.cshtml) - NewModel DirectiveToken - (16:2,7 [8] RazorPages.cshtml) - NewModel
DirectiveToken - (40:3,14 [17] RazorPages.cshtml) - "*, TestAssembly" DirectiveToken - (40:3,14 [12] RazorPages.cshtml) - "*, AppCode"
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - private static System.Object __o = null; RazorIRToken - - CSharp - private static System.Object __o = null;
DeclareTagHelperFields - - DivTagHelper DeclareTagHelperFields - - DivTagHelper
MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync MethodDeclaration - - public - async, override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (7:1,0 [2] RazorPages.cshtml) HtmlContent - (7:1,0 [2] RazorPages.cshtml)
RazorIRToken - (7:1,0 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (7:1,0 [2] RazorPages.cshtml) - Html - \n
HtmlContent - (57:3,31 [2] RazorPages.cshtml) HtmlContent - (52:3,26 [2] RazorPages.cshtml)
RazorIRToken - (57:3,31 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (52:3,26 [2] RazorPages.cshtml) - Html - \n
HtmlContent - (101:4,42 [4] RazorPages.cshtml) HtmlContent - (96:4,42 [4] RazorPages.cshtml)
RazorIRToken - (101:4,42 [4] RazorPages.cshtml) - Html - \n\n RazorIRToken - (96:4,42 [4] RazorPages.cshtml) - Html - \n\n
HtmlContent - (478:22,1 [78] RazorPages.cshtml) HtmlContent - (473:22,1 [78] RazorPages.cshtml)
RazorIRToken - (478:22,1 [4] RazorPages.cshtml) - Html - \n\n RazorIRToken - (473:22,1 [4] RazorPages.cshtml) - Html - \n\n
RazorIRToken - (482:24,0 [4] RazorPages.cshtml) - Html - <h1> RazorIRToken - (477:24,0 [4] RazorPages.cshtml) - Html - <h1>
RazorIRToken - (486:24,4 [12] RazorPages.cshtml) - Html - New Customer RazorIRToken - (481:24,4 [12] RazorPages.cshtml) - Html - New Customer
RazorIRToken - (498:24,16 [5] RazorPages.cshtml) - Html - </h1> RazorIRToken - (493:24,16 [5] RazorPages.cshtml) - Html - </h1>
RazorIRToken - (503:24,21 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (498:24,21 [2] RazorPages.cshtml) - Html - \n
RazorIRToken - (505:25,0 [5] RazorPages.cshtml) - Html - <form RazorIRToken - (500:25,0 [5] RazorPages.cshtml) - Html - <form
RazorIRToken - (510:25,5 [14] RazorPages.cshtml) - Html - method="post" RazorIRToken - (505:25,5 [14] RazorPages.cshtml) - Html - method="post"
RazorIRToken - (524:25,19 [24] RazorPages.cshtml) - Html - class="form-horizontal" RazorIRToken - (519:25,19 [24] RazorPages.cshtml) - Html - class="form-horizontal"
RazorIRToken - (548:25,43 [2] RazorPages.cshtml) - Html - > RazorIRToken - (543:25,43 [2] RazorPages.cshtml) - Html - >
RazorIRToken - (550:25,45 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (545:25,45 [6] RazorPages.cshtml) - Html - \n
TagHelper - (556:26,4 [31] RazorPages.cshtml) TagHelper - (551:26,4 [31] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (568:26,16 [11] RazorPages.cshtml) HtmlContent - (563:26,16 [11] RazorPages.cshtml)
RazorIRToken - (568:26,16 [11] RazorPages.cshtml) - Html - text-danger RazorIRToken - (563:26,16 [11] RazorPages.cshtml) - Html - text-danger
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (587:26,35 [6] RazorPages.cshtml) HtmlContent - (582:26,35 [6] RazorPages.cshtml)
RazorIRToken - (587:26,35 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (582:26,35 [6] RazorPages.cshtml) - Html - \n
TagHelper - (593:27,4 [237] RazorPages.cshtml) TagHelper - (588:27,4 [243] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (617:27,28 [48] RazorPages.cshtml) HtmlContent - (612:27,28 [48] RazorPages.cshtml)
RazorIRToken - (617:27,28 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (612:27,28 [10] RazorPages.cshtml) - Html - \n
RazorIRToken - (627:28,8 [6] RazorPages.cshtml) - Html - <label RazorIRToken - (622:28,8 [6] RazorPages.cshtml) - Html - <label
RazorIRToken - (633:28,14 [31] RazorPages.cshtml) - Html - class="col-md-2 control-label" RazorIRToken - (628:28,14 [31] RazorPages.cshtml) - Html - class="col-md-2 control-label"
RazorIRToken - (664:28,45 [1] RazorPages.cshtml) - Html - > RazorIRToken - (659:28,45 [1] RazorPages.cshtml) - Html - >
CSharpExpression - (666:28,47 [4] RazorPages.cshtml) CSharpExpression - (661:28,47 [10] RazorPages.cshtml)
RazorIRToken - (666:28,47 [4] RazorPages.cshtml) - CSharp - Name RazorIRToken - (661:28,47 [10] RazorPages.cshtml) - CSharp - Model.Name
HtmlContent - (670:28,51 [18] RazorPages.cshtml) HtmlContent - (671:28,57 [18] RazorPages.cshtml)
RazorIRToken - (670:28,51 [8] RazorPages.cshtml) - Html - </label> RazorIRToken - (671:28,57 [8] RazorPages.cshtml) - Html - </label>
RazorIRToken - (678:28,59 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (679:28,65 [10] RazorPages.cshtml) - Html - \n
TagHelper - (688:29,8 [130] RazorPages.cshtml) TagHelper - (689:29,8 [130] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (711:29,31 [101] RazorPages.cshtml) HtmlContent - (712:29,31 [101] RazorPages.cshtml)
RazorIRToken - (711:29,31 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (712:29,31 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (725:30,12 [6] RazorPages.cshtml) - Html - <input RazorIRToken - (726:30,12 [6] RazorPages.cshtml) - Html - <input
RazorIRToken - (731:30,18 [21] RazorPages.cshtml) - Html - class="form-control" RazorIRToken - (732:30,18 [21] RazorPages.cshtml) - Html - class="form-control"
RazorIRToken - (752:30,39 [3] RazorPages.cshtml) - Html - /> RazorIRToken - (753:30,39 [3] RazorPages.cshtml) - Html - />
RazorIRToken - (755:30,42 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (756:30,42 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (769:31,12 [5] RazorPages.cshtml) - Html - <span RazorIRToken - (770:31,12 [5] RazorPages.cshtml) - Html - <span
RazorIRToken - (774:31,17 [20] RazorPages.cshtml) - Html - class="text-danger" RazorIRToken - (775:31,17 [20] RazorPages.cshtml) - Html - class="text-danger"
RazorIRToken - (794:31,37 [1] RazorPages.cshtml) - Html - > RazorIRToken - (795:31,37 [1] RazorPages.cshtml) - Html - >
RazorIRToken - (795:31,38 [7] RazorPages.cshtml) - Html - </span> RazorIRToken - (796:31,38 [7] RazorPages.cshtml) - Html - </span>
RazorIRToken - (802:31,45 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (803:31,45 [10] RazorPages.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (700:29,20 [9] RazorPages.cshtml) HtmlContent - (701:29,20 [9] RazorPages.cshtml)
RazorIRToken - (700:29,20 [9] RazorPages.cshtml) - Html - col-md-10 RazorIRToken - (701:29,20 [9] RazorPages.cshtml) - Html - col-md-10
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (818:32,14 [6] RazorPages.cshtml) HtmlContent - (819:32,14 [6] RazorPages.cshtml)
RazorIRToken - (818:32,14 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (819:32,14 [6] RazorPages.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (605:27,16 [10] RazorPages.cshtml) HtmlContent - (600:27,16 [10] RazorPages.cshtml)
RazorIRToken - (605:27,16 [10] RazorPages.cshtml) - Html - form-group RazorIRToken - (600:27,16 [10] RazorPages.cshtml) - Html - form-group
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (830:33,10 [6] RazorPages.cshtml) HtmlContent - (831:33,10 [6] RazorPages.cshtml)
RazorIRToken - (830:33,10 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (831:33,10 [6] RazorPages.cshtml) - Html - \n
TagHelper - (836:34,4 [174] RazorPages.cshtml) TagHelper - (837:34,4 [174] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (860:34,28 [10] RazorPages.cshtml) HtmlContent - (861:34,28 [10] RazorPages.cshtml)
RazorIRToken - (860:34,28 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (861:34,28 [10] RazorPages.cshtml) - Html - \n
TagHelper - (870:35,8 [128] RazorPages.cshtml) TagHelper - (871:35,8 [128] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
HtmlContent - (909:35,47 [83] RazorPages.cshtml) HtmlContent - (910:35,47 [83] RazorPages.cshtml)
RazorIRToken - (909:35,47 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (910:35,47 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (923:36,12 [7] RazorPages.cshtml) - Html - <button RazorIRToken - (924:36,12 [7] RazorPages.cshtml) - Html - <button
RazorIRToken - (930:36,19 [14] RazorPages.cshtml) - Html - type="submit" RazorIRToken - (931:36,19 [14] RazorPages.cshtml) - Html - type="submit"
RazorIRToken - (944:36,33 [24] RazorPages.cshtml) - Html - class="btn btn-primary" RazorIRToken - (945:36,33 [24] RazorPages.cshtml) - Html - class="btn btn-primary"
RazorIRToken - (968:36,57 [1] RazorPages.cshtml) - Html - > RazorIRToken - (969:36,57 [1] RazorPages.cshtml) - Html - >
RazorIRToken - (969:36,58 [4] RazorPages.cshtml) - Html - Save RazorIRToken - (970:36,58 [4] RazorPages.cshtml) - Html - Save
RazorIRToken - (973:36,62 [9] RazorPages.cshtml) - Html - </button> RazorIRToken - (974:36,62 [9] RazorPages.cshtml) - Html - </button>
RazorIRToken - (982:36,71 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (983:36,71 [10] RazorPages.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (882:35,20 [25] RazorPages.cshtml) HtmlContent - (883:35,20 [25] RazorPages.cshtml)
RazorIRToken - (882:35,20 [25] RazorPages.cshtml) - Html - col-md-offset-2 col-md-10 RazorIRToken - (883:35,20 [25] RazorPages.cshtml) - Html - col-md-offset-2 col-md-10
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (998:37,14 [6] RazorPages.cshtml) HtmlContent - (999:37,14 [6] RazorPages.cshtml)
RazorIRToken - (998:37,14 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (999:37,14 [6] RazorPages.cshtml) - Html - \n
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes AddTagHelperHtmlAttribute - - class - HtmlAttributeValueStyle.DoubleQuotes
HtmlContent - (848:34,16 [10] RazorPages.cshtml) HtmlContent - (849:34,16 [10] RazorPages.cshtml)
RazorIRToken - (848:34,16 [10] RazorPages.cshtml) - Html - form-group RazorIRToken - (849:34,16 [10] RazorPages.cshtml) - Html - form-group
ExecuteTagHelpers - ExecuteTagHelpers -
HtmlContent - (1010:38,10 [11] RazorPages.cshtml) HtmlContent - (1011:38,10 [11] RazorPages.cshtml)
RazorIRToken - (1010:38,10 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (1011:38,10 [2] RazorPages.cshtml) - Html - \n
RazorIRToken - (1012:39,0 [7] RazorPages.cshtml) - Html - </form> RazorIRToken - (1013:39,0 [7] RazorPages.cshtml) - Html - </form>
RazorIRToken - (1019:39,7 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (1020:39,7 [2] RazorPages.cshtml) - Html - \n
CSharpStatement - (117:6,12 [360] RazorPages.cshtml) CSharpStatement - (112:6,12 [360] RazorPages.cshtml)
RazorIRToken - (117:6,12 [360] RazorPages.cshtml) - CSharp - \n public class NewModel : PageModel\n {\n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n RazorIRToken - (112:6,12 [360] RazorPages.cshtml) - CSharp - \n public class NewModel : PageModel\n {\n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -1,24 +1,24 @@
Source Location: (60:4,1 [41] /TestFiles/Input/RazorPages.cshtml) Source Location: (55:4,1 [41] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml)
|using Microsoft.AspNetCore.Mvc.RazorPages| |using Microsoft.AspNetCore.Mvc.RazorPages|
Generated Location: (370:12,0 [41] ) Generated Location: (423:12,0 [41] )
|using Microsoft.AspNetCore.Mvc.RazorPages| |using Microsoft.AspNetCore.Mvc.RazorPages|
Source Location: (16:2,7 [8] /TestFiles/Input/RazorPages.cshtml) Source Location: (16:2,7 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml)
|NewModel| |NewModel|
Generated Location: (684:21,0 [8] ) Generated Location: (777:21,0 [8] )
|NewModel| |NewModel|
Source Location: (40:3,14 [17] /TestFiles/Input/RazorPages.cshtml) Source Location: (40:3,14 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml)
|"*, TestAssembly"| |"*, AppCode"|
Generated Location: (812:25,37 [17] ) Generated Location: (918:25,37 [12] )
|"*, TestAssembly"| |"*, AppCode"|
Source Location: (666:28,47 [4] /TestFiles/Input/RazorPages.cshtml) Source Location: (661:28,47 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml)
|Name| |Model.Name|
Generated Location: (1313:37,47 [4] ) Generated Location: (1454:37,47 [10] )
|Name| |Model.Name|
Source Location: (117:6,12 [360] /TestFiles/Input/RazorPages.cshtml) Source Location: (112:6,12 [360] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml)
| |
public class NewModel : PageModel public class NewModel : PageModel
{ {
@ -36,7 +36,7 @@ Source Location: (117:6,12 [360] /TestFiles/Input/RazorPages.cshtml)
public string Name { get; set; } public string Name { get; set; }
} }
| |
Generated Location: (1742:48,12 [360] ) Generated Location: (1929:48,12 [360] )
| |
public class NewModel : PageModel public class NewModel : PageModel
{ {

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1b3a99159b0df739708e9384e871a4983f59c1e4" #pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "608b3f7b9b29c66ee25bde2d20324b4bef1aa070"
namespace AspNetCore namespace AspNetCore
{ {
#line hidden #line hidden
@ -45,10 +45,10 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
BeginContext(7, 2, true); BeginContext(7, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
BeginContext(103, 2, true); BeginContext(98, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
BeginContext(480, 76, true); BeginContext(475, 76, true);
WriteLiteral("\r\n<h1>New Customer</h1>\r\n<form method=\"post\" class=\"form-horizontal\" >\r\n "); WriteLiteral("\r\n<h1>New Customer</h1>\r\n<form method=\"post\" class=\"form-horizontal\" >\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
@ -57,7 +57,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
BeginContext(556, 31, false); BeginContext(551, 31, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -66,25 +66,25 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(587, 6, true); BeginContext(582, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(617, 48, true); BeginContext(612, 48, true);
WriteLiteral("\r\n <label class=\"col-md-2 control-label\">"); WriteLiteral("\r\n <label class=\"col-md-2 control-label\">");
EndContext(); EndContext();
BeginContext(666, 4, false); BeginContext(661, 10, false);
#line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml" #line 29 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml"
Write(Name); Write(Model.Name);
#line default #line default
#line hidden #line hidden
EndContext(); EndContext();
BeginContext(670, 18, true); BeginContext(671, 18, true);
WriteLiteral("</label>\r\n "); WriteLiteral("</label>\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(711, 101, true); BeginContext(712, 101, true);
WriteLiteral("\r\n <input class=\"form-control\" />\r\n <span class=\"text-danger\"></span>\r\n "); WriteLiteral("\r\n <input class=\"form-control\" />\r\n <span class=\"text-danger\"></span>\r\n ");
EndContext(); EndContext();
} }
@ -92,7 +92,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
BeginContext(688, 130, false); BeginContext(689, 130, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -101,7 +101,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(818, 6, true); BeginContext(819, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
} }
@ -109,7 +109,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
BeginContext(593, 237, false); BeginContext(588, 243, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -118,15 +118,15 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(830, 6, true); BeginContext(831, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(860, 10, true); BeginContext(861, 10, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("div", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "test", async() => {
BeginContext(909, 83, true); BeginContext(910, 83, true);
WriteLiteral("\r\n <button type=\"submit\" class=\"btn btn-primary\">Save</button>\r\n "); WriteLiteral("\r\n <button type=\"submit\" class=\"btn btn-primary\">Save</button>\r\n ");
EndContext(); EndContext();
} }
@ -134,7 +134,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
BeginContext(870, 128, false); BeginContext(871, 128, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -143,7 +143,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(998, 6, true); BeginContext(999, 6, true);
WriteLiteral("\r\n "); WriteLiteral("\r\n ");
EndContext(); EndContext();
} }
@ -151,7 +151,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
__DivTagHelper = CreateTagHelper<global::DivTagHelper>(); __DivTagHelper = CreateTagHelper<global::DivTagHelper>();
__tagHelperExecutionContext.Add(__DivTagHelper); __tagHelperExecutionContext.Add(__DivTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
BeginContext(836, 174, false); BeginContext(837, 174, false);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -160,7 +160,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
EndContext(); EndContext();
BeginContext(1010, 11, true); BeginContext(1011, 11, true);
WriteLiteral("\r\n</form>\r\n"); WriteLiteral("\r\n</form>\r\n");
EndContext(); EndContext();
} }

View File

@ -8,7 +8,7 @@ Document -
UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc UsingStatement - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering UsingStatement - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures UsingStatement - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
UsingStatement - (60:4,1 [43] RazorPages.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages UsingStatement - (55:4,1 [43] RazorPages.cshtml) - Microsoft.AspNetCore.Mvc.RazorPages
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page - ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages_cshtml - global::Microsoft.AspNetCore.Mvc.RazorPages.Page -
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - class - text-danger - HtmlAttributeValueStyle.DoubleQuotes
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - class - col-md-10 - HtmlAttributeValueStyle.DoubleQuotes
@ -23,161 +23,161 @@ Document -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(103, 2, true); RazorIRToken - - CSharp - BeginContext(98, 2, true);
HtmlContent - (103:5,0 [2] RazorPages.cshtml) HtmlContent - (98:5,0 [2] RazorPages.cshtml)
RazorIRToken - (103:5,0 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (98:5,0 [2] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(480, 76, true); RazorIRToken - - CSharp - BeginContext(475, 76, true);
HtmlContent - (480:23,0 [76] RazorPages.cshtml) HtmlContent - (475:23,0 [76] RazorPages.cshtml)
RazorIRToken - (480:23,0 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (475:23,0 [2] RazorPages.cshtml) - Html - \n
RazorIRToken - (482:24,0 [4] RazorPages.cshtml) - Html - <h1> RazorIRToken - (477:24,0 [4] RazorPages.cshtml) - Html - <h1>
RazorIRToken - (486:24,4 [12] RazorPages.cshtml) - Html - New Customer RazorIRToken - (481:24,4 [12] RazorPages.cshtml) - Html - New Customer
RazorIRToken - (498:24,16 [5] RazorPages.cshtml) - Html - </h1> RazorIRToken - (493:24,16 [5] RazorPages.cshtml) - Html - </h1>
RazorIRToken - (503:24,21 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (498:24,21 [2] RazorPages.cshtml) - Html - \n
RazorIRToken - (505:25,0 [5] RazorPages.cshtml) - Html - <form RazorIRToken - (500:25,0 [5] RazorPages.cshtml) - Html - <form
RazorIRToken - (510:25,5 [14] RazorPages.cshtml) - Html - method="post" RazorIRToken - (505:25,5 [14] RazorPages.cshtml) - Html - method="post"
RazorIRToken - (524:25,19 [24] RazorPages.cshtml) - Html - class="form-horizontal" RazorIRToken - (519:25,19 [24] RazorPages.cshtml) - Html - class="form-horizontal"
RazorIRToken - (548:25,43 [2] RazorPages.cshtml) - Html - > RazorIRToken - (543:25,43 [2] RazorPages.cshtml) - Html - >
RazorIRToken - (550:25,45 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (545:25,45 [6] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (556:26,4 [31] RazorPages.cshtml) TagHelper - (551:26,4 [31] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(556, 31, false); RazorIRToken - - CSharp - BeginContext(551, 31, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(587, 6, true); RazorIRToken - - CSharp - BeginContext(582, 6, true);
HtmlContent - (587:26,35 [6] RazorPages.cshtml) HtmlContent - (582:26,35 [6] RazorPages.cshtml)
RazorIRToken - (587:26,35 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (582:26,35 [6] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (593:27,4 [237] RazorPages.cshtml) TagHelper - (588:27,4 [243] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(617, 48, true); RazorIRToken - - CSharp - BeginContext(612, 48, true);
HtmlContent - (617:27,28 [48] RazorPages.cshtml) HtmlContent - (612:27,28 [48] RazorPages.cshtml)
RazorIRToken - (617:27,28 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (612:27,28 [10] RazorPages.cshtml) - Html - \n
RazorIRToken - (627:28,8 [6] RazorPages.cshtml) - Html - <label RazorIRToken - (622:28,8 [6] RazorPages.cshtml) - Html - <label
RazorIRToken - (633:28,14 [31] RazorPages.cshtml) - Html - class="col-md-2 control-label" RazorIRToken - (628:28,14 [31] RazorPages.cshtml) - Html - class="col-md-2 control-label"
RazorIRToken - (664:28,45 [1] RazorPages.cshtml) - Html - > RazorIRToken - (659:28,45 [1] RazorPages.cshtml) - Html - >
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(666, 4, false); RazorIRToken - - CSharp - BeginContext(661, 10, false);
CSharpExpression - (666:28,47 [4] RazorPages.cshtml) CSharpExpression - (661:28,47 [10] RazorPages.cshtml)
RazorIRToken - (666:28,47 [4] RazorPages.cshtml) - CSharp - Name RazorIRToken - (661:28,47 [10] RazorPages.cshtml) - CSharp - Model.Name
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(670, 18, true); RazorIRToken - - CSharp - BeginContext(671, 18, true);
HtmlContent - (670:28,51 [18] RazorPages.cshtml) HtmlContent - (671:28,57 [18] RazorPages.cshtml)
RazorIRToken - (670:28,51 [8] RazorPages.cshtml) - Html - </label> RazorIRToken - (671:28,57 [8] RazorPages.cshtml) - Html - </label>
RazorIRToken - (678:28,59 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (679:28,65 [10] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (688:29,8 [130] RazorPages.cshtml) TagHelper - (689:29,8 [130] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(711, 101, true); RazorIRToken - - CSharp - BeginContext(712, 101, true);
HtmlContent - (711:29,31 [101] RazorPages.cshtml) HtmlContent - (712:29,31 [101] RazorPages.cshtml)
RazorIRToken - (711:29,31 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (712:29,31 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (725:30,12 [6] RazorPages.cshtml) - Html - <input RazorIRToken - (726:30,12 [6] RazorPages.cshtml) - Html - <input
RazorIRToken - (731:30,18 [21] RazorPages.cshtml) - Html - class="form-control" RazorIRToken - (732:30,18 [21] RazorPages.cshtml) - Html - class="form-control"
RazorIRToken - (752:30,39 [3] RazorPages.cshtml) - Html - /> RazorIRToken - (753:30,39 [3] RazorPages.cshtml) - Html - />
RazorIRToken - (755:30,42 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (756:30,42 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (769:31,12 [5] RazorPages.cshtml) - Html - <span RazorIRToken - (770:31,12 [5] RazorPages.cshtml) - Html - <span
RazorIRToken - (774:31,17 [20] RazorPages.cshtml) - Html - class="text-danger" RazorIRToken - (775:31,17 [20] RazorPages.cshtml) - Html - class="text-danger"
RazorIRToken - (794:31,37 [1] RazorPages.cshtml) - Html - > RazorIRToken - (795:31,37 [1] RazorPages.cshtml) - Html - >
RazorIRToken - (795:31,38 [7] RazorPages.cshtml) - Html - </span> RazorIRToken - (796:31,38 [7] RazorPages.cshtml) - Html - </span>
RazorIRToken - (802:31,45 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (803:31,45 [10] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(688, 130, false); RazorIRToken - - CSharp - BeginContext(689, 130, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(818, 6, true); RazorIRToken - - CSharp - BeginContext(819, 6, true);
HtmlContent - (818:32,14 [6] RazorPages.cshtml) HtmlContent - (819:32,14 [6] RazorPages.cshtml)
RazorIRToken - (818:32,14 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (819:32,14 [6] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(593, 237, false); RazorIRToken - - CSharp - BeginContext(588, 243, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(830, 6, true); RazorIRToken - - CSharp - BeginContext(831, 6, true);
HtmlContent - (830:33,10 [6] RazorPages.cshtml) HtmlContent - (831:33,10 [6] RazorPages.cshtml)
RazorIRToken - (830:33,10 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (831:33,10 [6] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (836:34,4 [174] RazorPages.cshtml) TagHelper - (837:34,4 [174] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(860, 10, true); RazorIRToken - - CSharp - BeginContext(861, 10, true);
HtmlContent - (860:34,28 [10] RazorPages.cshtml) HtmlContent - (861:34,28 [10] RazorPages.cshtml)
RazorIRToken - (860:34,28 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (861:34,28 [10] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
TagHelper - (870:35,8 [128] RazorPages.cshtml) TagHelper - (871:35,8 [128] RazorPages.cshtml)
InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag InitializeTagHelperStructure - - div - TagMode.StartTagAndEndTag
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(909, 83, true); RazorIRToken - - CSharp - BeginContext(910, 83, true);
HtmlContent - (909:35,47 [83] RazorPages.cshtml) HtmlContent - (910:35,47 [83] RazorPages.cshtml)
RazorIRToken - (909:35,47 [14] RazorPages.cshtml) - Html - \n RazorIRToken - (910:35,47 [14] RazorPages.cshtml) - Html - \n
RazorIRToken - (923:36,12 [7] RazorPages.cshtml) - Html - <button RazorIRToken - (924:36,12 [7] RazorPages.cshtml) - Html - <button
RazorIRToken - (930:36,19 [14] RazorPages.cshtml) - Html - type="submit" RazorIRToken - (931:36,19 [14] RazorPages.cshtml) - Html - type="submit"
RazorIRToken - (944:36,33 [24] RazorPages.cshtml) - Html - class="btn btn-primary" RazorIRToken - (945:36,33 [24] RazorPages.cshtml) - Html - class="btn btn-primary"
RazorIRToken - (968:36,57 [1] RazorPages.cshtml) - Html - > RazorIRToken - (969:36,57 [1] RazorPages.cshtml) - Html - >
RazorIRToken - (969:36,58 [4] RazorPages.cshtml) - Html - Save RazorIRToken - (970:36,58 [4] RazorPages.cshtml) - Html - Save
RazorIRToken - (973:36,62 [9] RazorPages.cshtml) - Html - </button> RazorIRToken - (974:36,62 [9] RazorPages.cshtml) - Html - </button>
RazorIRToken - (982:36,71 [10] RazorPages.cshtml) - Html - \n RazorIRToken - (983:36,71 [10] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_3
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(870, 128, false); RazorIRToken - - CSharp - BeginContext(871, 128, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(998, 6, true); RazorIRToken - - CSharp - BeginContext(999, 6, true);
HtmlContent - (998:37,14 [6] RazorPages.cshtml) HtmlContent - (999:37,14 [6] RazorPages.cshtml)
RazorIRToken - (998:37,14 [6] RazorPages.cshtml) - Html - \n RazorIRToken - (999:37,14 [6] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CreateTagHelper - - DivTagHelper CreateTagHelper - - DivTagHelper
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(836, 174, false); RazorIRToken - - CSharp - BeginContext(837, 174, false);
ExecuteTagHelpers - ExecuteTagHelpers -
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - BeginContext(1010, 11, true); RazorIRToken - - CSharp - BeginContext(1011, 11, true);
HtmlContent - (1010:38,10 [11] RazorPages.cshtml) HtmlContent - (1011:38,10 [11] RazorPages.cshtml)
RazorIRToken - (1010:38,10 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (1011:38,10 [2] RazorPages.cshtml) - Html - \n
RazorIRToken - (1012:39,0 [7] RazorPages.cshtml) - Html - </form> RazorIRToken - (1013:39,0 [7] RazorPages.cshtml) - Html - </form>
RazorIRToken - (1019:39,7 [2] RazorPages.cshtml) - Html - \n RazorIRToken - (1020:39,7 [2] RazorPages.cshtml) - Html - \n
CSharpStatement - CSharpStatement -
RazorIRToken - - CSharp - EndContext(); RazorIRToken - - CSharp - EndContext();
CSharpStatement - (117:6,12 [360] RazorPages.cshtml) CSharpStatement - (112:6,12 [360] RazorPages.cshtml)
RazorIRToken - (117:6,12 [360] RazorPages.cshtml) - CSharp - \n public class NewModel : PageModel\n {\n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n RazorIRToken - (112:6,12 [360] RazorPages.cshtml) - CSharp - \n public class NewModel : PageModel\n {\n public IActionResult OnPost(Customer customer)\n {\n Name = customer.Name;\n return Redirect("~/customers/inlinepagemodels/");\n }\n\n public string Name { get; set; }\n }\n\n public class Customer\n {\n public string Name { get; set; }\n }\n
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -
InjectDirective - InjectDirective -

View File

@ -0,0 +1,5 @@
Source Location: (11:0,11 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace.cshtml)
|Test.Namespace|
Generated Location: (621:16,44 [14] )
|Test.Namespace|

View File

@ -14,7 +14,7 @@ namespace AspNetCore
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
IHtmlHelper<TModel> __typeHelper = null; IHtmlHelper<TModel> __typeHelper = default(IHtmlHelper<TModel>);
} }
))(); ))();
((System.Action)(() => { ((System.Action)(() => {

View File

@ -1,10 +1,10 @@
Source Location: (8:0,8 [19] /TestFiles/Input/_ViewImports.cshtml) Source Location: (8:0,8 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml)
|IHtmlHelper<TModel>| |IHtmlHelper<TModel>|
Generated Location: (587:16,0 [19] ) Generated Location: (627:16,0 [19] )
|IHtmlHelper<TModel>| |IHtmlHelper<TModel>|
Source Location: (28:0,28 [5] /TestFiles/Input/_ViewImports.cshtml) Source Location: (28:0,28 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml)
|Model| |Model|
Generated Location: (711:20,22 [5] ) Generated Location: (775:20,22 [5] )
|Model| |Model|

View File

@ -65,7 +65,7 @@ private void __RazorDirectiveTokenHelpers__() {
@"#pragma warning disable 219 @"#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
System.String __typeHelper = null; System.String __typeHelper = default(System.String);
} }
))(); ))();
} }

View File

@ -26,7 +26,8 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
// Assert // Assert
AssertIRMatchesBaseline(document.GetIRDocument()); AssertIRMatchesBaseline(document.GetIRDocument());
AssertDesignTimeDocumentMatchBaseline(document); AssertCSharpDocumentMatchesBaseline(document.GetCSharpDocument());
AssertLineMappingsMatchBaseline(document);
} }
} }
} }

View File

@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests.TestFiles
#pragma warning disable 219 #pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() { private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => { ((System.Action)(() => {
foo.bar<baz<biz>>.boz __typeHelper = null; foo.bar<baz<biz>>.boz __typeHelper = default(foo.bar<baz<biz>>.boz);
} }
))(); ))();
} }

View File

@ -5,6 +5,6 @@ Generated Location: (349:8,0 [21] )
Source Location: (1:0,1 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits.cshtml) Source Location: (1:0,1 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inherits.cshtml)
|foo()| |foo()|
Generated Location: (721:18,6 [5] ) Generated Location: (747:18,6 [5] )
|foo()| |foo()|

View File

@ -169,24 +169,17 @@ namespace Microsoft.AspNetCore.Razor.Language.IntegrationTests
Assert.Equal(baseline, actual); Assert.Equal(baseline, actual);
} }
protected void AssertDesignTimeDocumentMatchBaseline(RazorCodeDocument document) protected void AssertLineMappingsMatchBaseline(RazorCodeDocument document)
{ {
if (Filename == null) if (Filename == null)
{ {
var message = $"{nameof(AssertDesignTimeDocumentMatchBaseline)} should only be called from an integration test ({nameof(Filename)} is null)."; var message = $"{nameof(AssertLineMappingsMatchBaseline)} should only be called from an integration test ({nameof(Filename)} is null).";
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
} }
var csharpDocument = document.GetCSharpDocument(); var csharpDocument = document.GetCSharpDocument();
Assert.NotNull(csharpDocument); Assert.NotNull(csharpDocument);
var syntaxTree = document.GetSyntaxTree();
Assert.NotNull(syntaxTree);
Assert.True(syntaxTree.Options.DesignTimeMode);
// Validate generated code.
AssertCSharpDocumentMatchesBaseline(csharpDocument);
var baselineFilename = Path.ChangeExtension(Filename, ".mappings.txt"); var baselineFilename = Path.ChangeExtension(Filename, ".mappings.txt");
var serializedMappings = LineMappingsSerializer.Serialize(csharpDocument, document.Source); var serializedMappings = LineMappingsSerializer.Serialize(csharpDocument, document.Source);

View File

@ -11,9 +11,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Language\Microsoft.AspNetCore.Razor.Language.csproj" /> <ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Language\Microsoft.AspNetCore.Razor.Language.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" /> <PackageReference Include="Microsoft.AspNetCore.Testing" Version="$(AspNetCoreVersion)" />
</ItemGroup> </ItemGroup>

View File

@ -0,0 +1,10 @@
// 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.
namespace Microsoft.AspNetCore.Mvc
{
public class ActionResult : IActionResult
{
}
}

View File

@ -0,0 +1,10 @@
// 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.
namespace Microsoft.AspNetCore.Mvc
{
public class RedirectResult : ActionResult
{
}
}

View File

@ -0,0 +1,14 @@
// 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 System;
namespace Microsoft.AspNetCore.Mvc.Razor.Internal
{
public class RazorInjectAttribute : Attribute
{
public RazorInjectAttribute ()
{
}
}
}

View File

@ -0,0 +1,20 @@
// 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.
namespace Microsoft.AspNetCore.Mvc.Razor
{
public abstract class RazorPage : RazorPageBase
{
public override void EndContext()
{
}
public override void BeginContext(int position, int length, bool isLiteral)
{
}
public override void EnsureRenderedBodyOrSections()
{
}
}
}

View File

@ -0,0 +1,201 @@
// 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 System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.Runtime.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Mvc.Razor
{
public abstract class RazorPageBase
{
public virtual ViewContext ViewContext { get; set; }
public string Layout { get; set; }
public virtual TextWriter Output { get; }
public string Path { get; set; }
public IDictionary<string, RenderAsyncDelegate> SectionWriters { get; }
public dynamic ViewBag { get; }
public bool IsLayoutBeingRendered { get; set; }
public IHtmlContent BodyContent { get; set; }
public IDictionary<string, RenderAsyncDelegate> PreviousSectionWriters { get; set; }
public DiagnosticSource DiagnosticSource { get; set; }
public HtmlEncoder HtmlEncoder { get; set; }
// This was "ClaimsPrincipal" but we didn't want to add the reference.
public virtual object User { get; }
public ITempDataDictionary TempData { get; }
public abstract Task ExecuteAsync();
public TTagHelper CreateTagHelper<TTagHelper>() where TTagHelper : ITagHelper
{
throw new NotImplementedException();
}
public void StartTagHelperWritingScope(HtmlEncoder encoder)
{
}
public TagHelperContent EndTagHelperWritingScope()
{
throw new NotImplementedException();
}
public void BeginWriteTagHelperAttribute()
{
}
public string EndWriteTagHelperAttribute()
{
throw new NotImplementedException();
}
public virtual string Href(string contentPath)
{
throw new NotImplementedException();
}
public virtual void DefineSection(string name, RenderAsyncDelegate section)
{
}
public virtual void Write(object value)
{
}
public virtual void WriteTo(TextWriter writer, object value)
{
}
public static void WriteTo(TextWriter writer, HtmlEncoder encoder, object value)
{
}
public virtual void WriteTo(TextWriter writer, string value)
{
}
private static void WriteTo(TextWriter writer, HtmlEncoder encoder, string value)
{
}
public virtual void WriteLiteral(object value)
{
}
public virtual void WriteLiteralTo(TextWriter writer, object value)
{
}
public virtual void WriteLiteralTo(TextWriter writer, string value)
{
}
public virtual void BeginWriteAttribute(
string name,
string prefix,
int prefixOffset,
string suffix,
int suffixOffset,
int attributeValuesCount)
{
}
public virtual void BeginWriteAttributeTo(
TextWriter writer,
string name,
string prefix,
int prefixOffset,
string suffix,
int suffixOffset,
int attributeValuesCount)
{
}
public void WriteAttributeValue(
string prefix,
int prefixOffset,
object value,
int valueOffset,
int valueLength,
bool isLiteral)
{
}
public void WriteAttributeValueTo(
TextWriter writer,
string prefix,
int prefixOffset,
object value,
int valueOffset,
int valueLength,
bool isLiteral)
{
}
public virtual void EndWriteAttribute()
{
}
public virtual void EndWriteAttributeTo(TextWriter writer)
{
}
public void BeginAddHtmlAttributeValues(
TagHelperExecutionContext executionContext,
string attributeName,
int attributeValuesCount,
HtmlAttributeValueStyle attributeValueStyle)
{
}
public void AddHtmlAttributeValue(
string prefix,
int prefixOffset,
object value,
int valueOffset,
int valueLength,
bool isLiteral)
{
}
public void EndAddHtmlAttributeValues(TagHelperExecutionContext executionContext)
{
}
public virtual Task<HtmlString> FlushAsync()
{
throw new NotImplementedException();
}
public virtual HtmlString SetAntiforgeryCookieAndHeader()
{
throw new NotImplementedException();
}
public abstract void BeginContext(int position, int length, bool isLiteral);
public abstract void EndContext();
public abstract void EnsureRenderedBodyOrSections();
}
}

View File

@ -0,0 +1,14 @@
// 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 Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Microsoft.AspNetCore.Mvc.Razor
{
public abstract class RazorPage<TModel> : RazorPage
{
public TModel Model { get; }
public ViewDataDictionary<TModel> ViewData { get; set; }
}
}

View File

@ -0,0 +1,9 @@
// 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 System.Threading.Tasks;
namespace Microsoft.AspNetCore.Mvc.Razor
{
public delegate Task RenderAsyncDelegate();
}

View File

@ -0,0 +1,32 @@
// 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 System;
using Microsoft.AspNetCore.Mvc.Razor;
namespace Microsoft.AspNetCore.Mvc.RazorPages
{
public abstract class Page : RazorPageBase
{
public PageContext PageContext { get; set; }
public virtual RedirectResult Redirect(string url) => throw new NotImplementedException();
public override void EnsureRenderedBodyOrSections()
{
}
public override void BeginContext(int position, int length, bool isLiteral)
{
}
public override void EndContext()
{
}
public virtual bool TryValidateModel(object model) => throw new NotImplementedException();
public virtual bool TryValidateModel(object model, string prefix) => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,12 @@
// 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 Microsoft.AspNetCore.Mvc.Rendering;
namespace Microsoft.AspNetCore.Mvc.RazorPages
{
public class PageContext : ViewContext
{
public Page Page { get; set; }
}
}

View File

@ -0,0 +1,43 @@
// 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 System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Microsoft.AspNetCore.Mvc.RazorPages
{
public abstract class PageModel
{
public IUrlHelper Url { get; set; }
public Page Page => PageContext?.Page;
public PageContext PageContext { get; set; }
public ViewContext ViewContext => PageContext;
public ITempDataDictionary TempData { get; }
public ViewDataDictionary ViewData { get; }
protected internal Task<bool> TryUpdateModelAsync<TModel>(TModel model)
where TModel : class
{
throw new NotImplementedException();
}
protected internal Task<bool> TryUpdateModelAsync<TModel>(TModel model, string name)
where TModel : class
{
throw new NotImplementedException();
}
protected internal RedirectResult Redirect(string url) => throw new NotImplementedException();
public virtual bool TryValidateModel(object model) => throw new NotImplementedException();
public virtual bool TryValidateModel(object model, string name) => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,9 @@
// 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.
namespace Microsoft.AspNetCore.Mvc.Rendering
{
public interface IHtmlHelper<TModel>
{
}
}

View File

@ -0,0 +1,10 @@
// 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.
namespace Microsoft.AspNetCore.Mvc.Rendering
{
public interface IJsonHelper
{
}
}

View File

@ -0,0 +1,12 @@
// 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 Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Microsoft.AspNetCore.Mvc.Rendering
{
public class ViewContext
{
public ViewDataDictionary ViewData { get; set; }
}
}

View File

@ -0,0 +1,15 @@
// 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 System;
using System.Linq.Expressions;
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
{
public interface IModelExpressionProvider
{
ModelExpression CreateModelExpression<TModel, TValue>(
ViewDataDictionary<TModel> viewData,
Expression<Func<TModel, TValue>> expression);
}
}

View File

@ -0,0 +1,9 @@
// 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.
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
{
public interface ITempDataDictionary
{
}
}

View File

@ -3,8 +3,7 @@
namespace Microsoft.AspNetCore.Mvc.ViewFeatures namespace Microsoft.AspNetCore.Mvc.ViewFeatures
{ {
// This class is hacked up to appear like the one in MVC so that we don't reference MVC public sealed class ModelExpression
public class ModelExpression
{ {
} }
} }

View File

@ -0,0 +1,92 @@
// 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 System;
using System.Collections;
using System.Collections.Generic;
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
{
public class ViewDataDictionary : IDictionary<string, object>
{
#region IDictionary properties
public object this[string index]
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public int Count { get; }
public bool IsReadOnly { get; }
public ICollection<string> Keys { get; }
public ICollection<object> Values { get; }
#endregion
#region IDictionary methods
public void Add(string key, object value)
{
}
public bool ContainsKey(string key)
{
throw new NotImplementedException();
}
public bool Remove(string key)
{
throw new NotImplementedException();
}
public bool TryGetValue(string key, out object value)
{
throw new NotImplementedException();
}
public void Add(KeyValuePair<string, object> item)
{
}
public void Clear()
{
}
public bool Contains(KeyValuePair<string, object> item)
{
throw new NotImplementedException();
}
public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
{
}
public bool Remove(KeyValuePair<string, object> item)
{
throw new NotImplementedException();
}
IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
{
throw new NotImplementedException();
}
IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
public IEnumerator GetEnumerator()
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@ -0,0 +1,7 @@
namespace Microsoft.AspNetCore.Mvc.ViewFeatures
{
public class ViewDataDictionary<TModel> : ViewDataDictionary
{
public TModel Model { get; set; }
}
}

View File

@ -0,0 +1,9 @@
// 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.
namespace Microsoft.AspNetCore.Mvc
{
public interface IActionResult
{
}
}

View File

@ -0,0 +1,10 @@
// 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.
namespace Microsoft.AspNetCore.Mvc
{
public interface IUrlHelper
{
}
}

View File

@ -0,0 +1,10 @@
// 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.
namespace Microsoft.AspNetCore.Mvc
{
public interface IViewComponentHelper
{
}
}

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.csproj" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="4.4.0-*" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,3 @@
{
"shadowCopy": false
}