Stop generating page/view attribute in 3.0
\n\nCommit migrated from 4eb93869b9
This commit is contained in:
parent
2c2ff1f592
commit
ceb1189b2e
|
|
@ -1,102 +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.Diagnostics;
|
||||
using Microsoft.AspNetCore.Razor.Language;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
||||
{
|
||||
public class AssemblyAttributeInjectionPass : IntermediateNodePassBase, IRazorOptimizationPass
|
||||
{
|
||||
private const string RazorViewAttribute = "global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute";
|
||||
private const string RazorPageAttribute = "global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute";
|
||||
|
||||
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
|
||||
{
|
||||
if (documentNode.Options.DesignTime)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var @namespace = documentNode.FindPrimaryNamespace();
|
||||
if (@namespace == null || string.IsNullOrEmpty(@namespace.Content))
|
||||
{
|
||||
// No namespace node or it's incomplete. Skip.
|
||||
return;
|
||||
}
|
||||
|
||||
var @class = documentNode.FindPrimaryClass();
|
||||
if (@class == null || string.IsNullOrEmpty(@class.ClassName))
|
||||
{
|
||||
// No class node or it's incomplete. Skip.
|
||||
return;
|
||||
}
|
||||
|
||||
var generatedTypeName = $"{@namespace.Content}.{@class.ClassName}";
|
||||
|
||||
// The MVC attributes require a relative path to be specified so that we can make a view engine path.
|
||||
// We can't use a rooted path because we don't know what the project root is.
|
||||
//
|
||||
// If we can't sanitize the path, we'll just set it to null and let is blow up at runtime - we don't
|
||||
// want to create noise if this code has to run in some unanticipated scenario.
|
||||
var escapedPath = MakeVerbatimStringLiteral(ConvertToViewEnginePath(codeDocument.Source.RelativePath));
|
||||
|
||||
string attribute;
|
||||
if (documentNode.DocumentKind == MvcViewDocumentClassifierPass.MvcViewDocumentKind)
|
||||
{
|
||||
attribute = $"[assembly:{RazorViewAttribute}({escapedPath}, typeof({generatedTypeName}))]";
|
||||
}
|
||||
else if (documentNode.DocumentKind == RazorPageDocumentClassifierPass.RazorPageDocumentKind &&
|
||||
PageDirective.TryGetPageDirective(documentNode, out var pageDirective))
|
||||
{
|
||||
var escapedRoutePrefix = MakeVerbatimStringLiteral(pageDirective.RouteTemplate);
|
||||
attribute = $"[assembly:{RazorPageAttribute}({escapedPath}, typeof({generatedTypeName}), {escapedRoutePrefix})]";
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var index = documentNode.Children.IndexOf(@namespace);
|
||||
Debug.Assert(index >= 0);
|
||||
|
||||
var pageAttribute = new CSharpCodeIntermediateNode();
|
||||
pageAttribute.Children.Add(new IntermediateToken()
|
||||
{
|
||||
Kind = TokenKind.CSharp,
|
||||
Content = attribute,
|
||||
});
|
||||
|
||||
documentNode.Children.Insert(index, pageAttribute);
|
||||
}
|
||||
|
||||
private static string MakeVerbatimStringLiteral(string value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return "null";
|
||||
}
|
||||
|
||||
value = value.Replace("\"", "\"\"");
|
||||
return $"@\"{value}\"";
|
||||
}
|
||||
|
||||
private static string ConvertToViewEnginePath(string relativePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(relativePath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Checking for both / and \ because a \ will become a /.
|
||||
if (!relativePath.StartsWith("/") && !relativePath.StartsWith("\\"))
|
||||
{
|
||||
relativePath = "/" + relativePath;
|
||||
}
|
||||
|
||||
relativePath = relativePath.Replace('\\', '/');
|
||||
return relativePath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
|||
builder.Features.Add(new ViewComponentTagHelperPass());
|
||||
builder.Features.Add(new RazorPageDocumentClassifierPass());
|
||||
builder.Features.Add(new MvcViewDocumentClassifierPass());
|
||||
builder.Features.Add(new AssemblyAttributeInjectionPass());
|
||||
|
||||
builder.SetImportFeature(new MvcImportProjectFeature());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,444 +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.Razor.Language;
|
||||
using Microsoft.AspNetCore.Razor.Language.Intermediate;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions
|
||||
{
|
||||
public class AssemblyAttributeInjectionPassTest
|
||||
{
|
||||
[Fact]
|
||||
public void Execute_NoOps_IfNamespaceNodeIsMissing()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(TestRazorCodeDocument.CreateEmpty(), irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Empty(irDocument.Children);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoOps_IfNamespaceNodeHasEmptyContent()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode() { Content = string.Empty };
|
||||
@namespace.Annotations[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace;
|
||||
builder.Push(@namespace);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(TestRazorCodeDocument.CreateEmpty(), irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoOps_IfClassNameNodeIsMissing()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode() { Content = "SomeNamespace" };
|
||||
builder.Push(@namespace);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(TestRazorCodeDocument.CreateEmpty(), irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(
|
||||
irDocument.Children,
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoOps_IfClassNameIsEmpty()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode()
|
||||
{
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace,
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(TestRazorCodeDocument.CreateEmpty(), irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoOps_IfDocumentIsNotViewOrPage()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = "Default",
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode() { Content = "SomeNamespace" };
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
// Act
|
||||
pass.Execute(TestRazorCodeDocument.CreateEmpty(), irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(
|
||||
irDocument.Children,
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_NoOps_ForDesignTime()
|
||||
{
|
||||
// Arrange
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = MvcViewDocumentClassifierPass.MvcViewDocumentKind,
|
||||
Options = RazorCodeGenerationOptions.CreateDesignTimeDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
var source = TestRazorSourceDocument.Create("test", new RazorSourceDocumentProperties(filePath: null, relativePath: "/Views/Index.cshtml"));
|
||||
var document = RazorCodeDocument.Create(source);
|
||||
|
||||
// Act
|
||||
pass.Execute(document, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(
|
||||
irDocument.Children,
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_AddsRazorViewAttribute_ToViews()
|
||||
{
|
||||
// Arrange
|
||||
var expectedAttribute = "[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@\"/Views/Index.cshtml\", typeof(SomeNamespace.SomeName))]";
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = MvcViewDocumentClassifierPass.MvcViewDocumentKind,
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
var source = TestRazorSourceDocument.Create("test", new RazorSourceDocumentProperties(filePath: null, relativePath: "/Views/Index.cshtml"));
|
||||
var document = RazorCodeDocument.Create(source);
|
||||
|
||||
// Act
|
||||
pass.Execute(document, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node =>
|
||||
{
|
||||
var csharpCode = Assert.IsType<CSharpCodeIntermediateNode>(node);
|
||||
var token = Assert.IsType<IntermediateToken>(Assert.Single(csharpCode.Children));
|
||||
Assert.Equal(TokenKind.CSharp, token.Kind);
|
||||
Assert.Equal(expectedAttribute, token.Content);
|
||||
},
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_EscapesViewPathWhenAddingAttributeToViews()
|
||||
{
|
||||
// Arrange
|
||||
var expectedAttribute = "[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@\"/test/\"\"Index.cshtml\", typeof(SomeNamespace.SomeName))]";
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = MvcViewDocumentClassifierPass.MvcViewDocumentKind,
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
var source = TestRazorSourceDocument.Create("test", new RazorSourceDocumentProperties(filePath: null, relativePath: "\\test\\\"Index.cshtml"));
|
||||
var document = RazorCodeDocument.Create(source);
|
||||
|
||||
// Act
|
||||
pass.Execute(document, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node =>
|
||||
{
|
||||
var csharpCode = Assert.IsType<CSharpCodeIntermediateNode>(node);
|
||||
var token = Assert.IsType<IntermediateToken>(Assert.Single(csharpCode.Children));
|
||||
Assert.Equal(TokenKind.CSharp, token.Kind);
|
||||
Assert.Equal(expectedAttribute, token.Content);
|
||||
},
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_AddsRazorPagettribute_ToPage()
|
||||
{
|
||||
// Arrange
|
||||
var expectedAttribute = "[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@\"/Views/Index.cshtml\", typeof(SomeNamespace.SomeName), null)]";
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = RazorPageDocumentClassifierPass.RazorPageDocumentKind,
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var pageDirective = new DirectiveIntermediateNode
|
||||
{
|
||||
Directive = PageDirective.Directive,
|
||||
};
|
||||
builder.Add(pageDirective);
|
||||
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
var source = TestRazorSourceDocument.Create("test", new RazorSourceDocumentProperties(filePath: null, relativePath: "/Views/Index.cshtml"));
|
||||
var document = RazorCodeDocument.Create(source);
|
||||
|
||||
// Act
|
||||
pass.Execute(document, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node => Assert.Same(pageDirective, node),
|
||||
node =>
|
||||
{
|
||||
var csharpCode = Assert.IsType<CSharpCodeIntermediateNode>(node);
|
||||
var token = Assert.IsType<IntermediateToken>(Assert.Single(csharpCode.Children));
|
||||
Assert.Equal(TokenKind.CSharp, token.Kind);
|
||||
Assert.Equal(expectedAttribute, token.Content);
|
||||
},
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Execute_EscapesViewPathAndRouteWhenAddingAttributeToPage()
|
||||
{
|
||||
// Arrange
|
||||
var expectedAttribute = "[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@\"/test/\"\"Index.cshtml\", typeof(SomeNamespace.SomeName))]";
|
||||
var irDocument = new DocumentIntermediateNode
|
||||
{
|
||||
DocumentKind = MvcViewDocumentClassifierPass.MvcViewDocumentKind,
|
||||
Options = RazorCodeGenerationOptions.CreateDefault(),
|
||||
};
|
||||
var builder = IntermediateNodeBuilder.Create(irDocument);
|
||||
var @namespace = new NamespaceDeclarationIntermediateNode
|
||||
{
|
||||
Content = "SomeNamespace",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryNamespace] = CommonAnnotations.PrimaryNamespace
|
||||
},
|
||||
};
|
||||
builder.Push(@namespace);
|
||||
var @class = new ClassDeclarationIntermediateNode
|
||||
{
|
||||
ClassName = "SomeName",
|
||||
Annotations =
|
||||
{
|
||||
[CommonAnnotations.PrimaryClass] = CommonAnnotations.PrimaryClass,
|
||||
},
|
||||
};
|
||||
|
||||
builder.Add(@class);
|
||||
|
||||
var pass = new AssemblyAttributeInjectionPass
|
||||
{
|
||||
Engine = RazorProjectEngine.Create().Engine,
|
||||
};
|
||||
|
||||
var source = TestRazorSourceDocument.Create("test", new RazorSourceDocumentProperties(filePath: null, relativePath: "test\\\"Index.cshtml"));
|
||||
var document = RazorCodeDocument.Create(source);
|
||||
|
||||
// Act
|
||||
pass.Execute(document, irDocument);
|
||||
|
||||
// Assert
|
||||
Assert.Collection(irDocument.Children,
|
||||
node =>
|
||||
{
|
||||
var csharpCode = Assert.IsType<CSharpCodeIntermediateNode>(node);
|
||||
var token = Assert.IsType<IntermediateToken>(Assert.Single(csharpCode.Children));
|
||||
Assert.Equal(TokenKind.CSharp, token.Kind);
|
||||
Assert.Equal(expectedAttribute, token.Content);
|
||||
},
|
||||
node => Assert.Same(@namespace, node));
|
||||
}
|
||||
|
||||
private DocumentIntermediateNode CreateIRDocument(RazorEngine engine, RazorCodeDocument codeDocument)
|
||||
{
|
||||
for (var i = 0; i < engine.Phases.Count; i++)
|
||||
{
|
||||
var phase = engine.Phases[i];
|
||||
phase.Execute(codeDocument);
|
||||
|
||||
if (phase is IRazorDocumentClassifierPhase)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return codeDocument.GetDocumentIntermediateNode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/MalformedPageDirective.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_MalformedPageDirective), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ModelExpressionTagHelper.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ModelExpressionTagHelper))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Model.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Model))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace.cshtml", typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), null)]
|
||||
namespace Test.Namespace
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PageWithNamespace.cshtml", typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PageWithNamespace), null)]
|
||||
NamespaceDeclaration - - Test.Namespace
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPageWithNoLeadingPageDirective), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPageWithNoLeadingPageDirective.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPageWithNoLeadingPageDirective.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPageWithNoLeadingPageDirective), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPageWithNoLeadingPageDirective.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPageWithNoLeadingPageDirective), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithRouteTemplate), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithRouteTemplate), @"/About")]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithRouteTemplate.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithRouteTemplate), @"/About")]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPagesWithoutModel.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPagesWithoutModel), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), @"mvc.1.0.razor-page", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), null)]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.RazorPageAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/RazorPages.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_RazorPages), null)]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Sections.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Sections))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UsingDirectives), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UsingDirectives))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/UsingDirectives.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_UsingDirectives))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
UsingDirective - (51:2,1 [19] ) - System.Linq
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewComponentTagHelper.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewComponentTagHelper))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace.cshtml", typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace))]
|
||||
namespace Test.Namespace
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ViewWithNamespace.cshtml", typeof(Test.Namespace.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ViewWithNamespace))]
|
||||
NamespaceDeclaration - - Test.Namespace
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml")]
|
||||
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports))]
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line hidden
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
Document -
|
||||
RazorCompiledItemAttribute -
|
||||
CSharpCode -
|
||||
IntermediateToken - - CSharp - [assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/_ViewImports.cshtml", typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest__ViewImports))]
|
||||
NamespaceDeclaration - - AspNetCore
|
||||
UsingDirective - (1:0,1 [14] ) - System
|
||||
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
|
||||
|
|
|
|||
|
|
@ -1,27 +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;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.Razor.Compilation
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
|
||||
public class RazorViewAttribute : Attribute
|
||||
{
|
||||
public RazorViewAttribute(string path, Type viewType)
|
||||
{
|
||||
Path = path;
|
||||
ViewType = viewType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path of the view.
|
||||
/// </summary>
|
||||
public string Path { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view type.
|
||||
/// </summary>
|
||||
public Type ViewType { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +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;
|
||||
using Microsoft.AspNetCore.Mvc.Razor.Compilation;
|
||||
|
||||
namespace Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure
|
||||
{
|
||||
public class RazorPageAttribute : RazorViewAttribute
|
||||
{
|
||||
public RazorPageAttribute(string path, Type viewType, string routeTemplate)
|
||||
: base(path, viewType)
|
||||
{
|
||||
RouteTemplate = routeTemplate;
|
||||
}
|
||||
|
||||
public string RouteTemplate { get; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue