Update the namespace for Razor generated code to AspNetCore
Fixes #4476
This commit is contained in:
parent
8ab66ab5ce
commit
69e029fc79
|
|
@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
_chunkTreeCache = chunkTreeCache;
|
||||
|
||||
DefaultBaseClass = $"{BaseType}<{ChunkHelper.TModelToken}>";
|
||||
DefaultNamespace = "Asp";
|
||||
DefaultNamespace = "AspNetCore";
|
||||
// Enable instrumentation by default to allow precompiled views to work with BrowserLink.
|
||||
EnableInstrumentation = true;
|
||||
GeneratedClassContext = new GeneratedClassContext(
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 33,
|
||||
documentLineIndex: 2,
|
||||
documentCharacterIndex: 14,
|
||||
generatedAbsoluteIndex: 647,
|
||||
generatedAbsoluteIndex: 654,
|
||||
generatedLineIndex: 17,
|
||||
generatedCharacterIndex: 48,
|
||||
contentLength: 91),
|
||||
|
|
@ -147,7 +147,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 7,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 7,
|
||||
generatedAbsoluteIndex: 829,
|
||||
generatedAbsoluteIndex: 836,
|
||||
generatedLineIndex: 19,
|
||||
generatedCharacterIndex: 28,
|
||||
contentLength: 8),
|
||||
|
|
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 145,
|
||||
documentLineIndex: 4,
|
||||
documentCharacterIndex: 17,
|
||||
generatedAbsoluteIndex: 2523,
|
||||
generatedAbsoluteIndex: 2530,
|
||||
generatedLineIndex: 50,
|
||||
generatedCharacterIndex: 133,
|
||||
contentLength: 3),
|
||||
|
|
@ -163,7 +163,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 172,
|
||||
documentLineIndex: 5,
|
||||
documentCharacterIndex: 18,
|
||||
generatedAbsoluteIndex: 2890,
|
||||
generatedAbsoluteIndex: 2897,
|
||||
generatedLineIndex: 56,
|
||||
generatedCharacterIndex: 125,
|
||||
contentLength: 5),
|
||||
|
|
@ -208,12 +208,12 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
{
|
||||
host.NamespaceImports.Clear();
|
||||
var expectedLineMappings = new[]
|
||||
{
|
||||
{
|
||||
BuildLineMapping(
|
||||
documentAbsoluteIndex: 13,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 13,
|
||||
generatedAbsoluteIndex: 1492,
|
||||
generatedAbsoluteIndex: 1499,
|
||||
generatedLineIndex: 34,
|
||||
generatedCharacterIndex: 13,
|
||||
contentLength: 4),
|
||||
|
|
@ -221,12 +221,13 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 43,
|
||||
documentLineIndex: 2,
|
||||
documentCharacterIndex: 5,
|
||||
generatedAbsoluteIndex: 1576,
|
||||
generatedAbsoluteIndex: 1583,
|
||||
generatedLineIndex: 39,
|
||||
generatedCharacterIndex: 6,
|
||||
contentLength: 21),
|
||||
};
|
||||
|
||||
|
||||
// Act and Assert
|
||||
RunDesignTimeTest(host, "Basic", expectedLineMappings);
|
||||
}
|
||||
|
|
@ -249,7 +250,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 8,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 659,
|
||||
generatedAbsoluteIndex: 666,
|
||||
generatedLineIndex: 21,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 26),
|
||||
|
|
@ -277,7 +278,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 1,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 1,
|
||||
generatedAbsoluteIndex: 59,
|
||||
generatedAbsoluteIndex: 66,
|
||||
generatedLineIndex: 3,
|
||||
generatedCharacterIndex: 0,
|
||||
contentLength: 17),
|
||||
|
|
@ -285,7 +286,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 28,
|
||||
documentLineIndex: 1,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 704,
|
||||
generatedAbsoluteIndex: 711,
|
||||
generatedLineIndex: 26,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 20),
|
||||
|
|
@ -313,7 +314,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 7,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 7,
|
||||
generatedAbsoluteIndex: 390,
|
||||
generatedAbsoluteIndex: 397,
|
||||
generatedLineIndex: 11,
|
||||
generatedCharacterIndex: 28,
|
||||
contentLength: 7),
|
||||
|
|
@ -321,7 +322,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 24,
|
||||
documentLineIndex: 1,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 753,
|
||||
generatedAbsoluteIndex: 760,
|
||||
generatedLineIndex: 25,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 20),
|
||||
|
|
@ -329,7 +330,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 54,
|
||||
documentLineIndex: 2,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 983,
|
||||
generatedAbsoluteIndex: 990,
|
||||
generatedLineIndex: 33,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 23),
|
||||
|
|
@ -357,7 +358,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 7,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 7,
|
||||
generatedAbsoluteIndex: 398,
|
||||
generatedAbsoluteIndex: 405,
|
||||
generatedLineIndex: 11,
|
||||
generatedCharacterIndex: 28,
|
||||
contentLength: 7),
|
||||
|
|
@ -365,7 +366,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 24,
|
||||
documentLineIndex: 1,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 769,
|
||||
generatedAbsoluteIndex: 776,
|
||||
generatedLineIndex: 25,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 20),
|
||||
|
|
@ -373,7 +374,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 58,
|
||||
documentLineIndex: 2,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 1003,
|
||||
generatedAbsoluteIndex: 1010,
|
||||
generatedLineIndex: 33,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 23),
|
||||
|
|
@ -381,7 +382,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 93,
|
||||
documentLineIndex: 3,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 1240,
|
||||
generatedAbsoluteIndex: 1247,
|
||||
generatedLineIndex: 41,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 21),
|
||||
|
|
@ -389,7 +390,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 129,
|
||||
documentLineIndex: 4,
|
||||
documentCharacterIndex: 8,
|
||||
generatedAbsoluteIndex: 1475,
|
||||
generatedAbsoluteIndex: 1482,
|
||||
generatedLineIndex: 49,
|
||||
generatedCharacterIndex: 8,
|
||||
contentLength: 24),
|
||||
|
|
@ -417,7 +418,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
|||
documentAbsoluteIndex: 7,
|
||||
documentLineIndex: 0,
|
||||
documentCharacterIndex: 7,
|
||||
generatedAbsoluteIndex: 393,
|
||||
generatedAbsoluteIndex: 400,
|
||||
generatedLineIndex: 11,
|
||||
generatedCharacterIndex: 28,
|
||||
contentLength: 30),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line 1 "testfiles/input/inject.cshtml"
|
||||
using MyNamespace
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/Basic.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "54a70ff4c6d27ac6cdc6725cb6bab12012015729"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/Inject.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "225760ec3beca02a80469066fab66433e90ddc2e"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
#line 1 "TestFiles/Input/Inject.cshtml"
|
||||
using MyNamespace
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/InjectWithModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1f010500f93116162444110956e512df61642f4e"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/InjectWithSemicolon.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "fc807ec0dc76610bdca62f482fefd7f584348df9"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/Model.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "31c5b047a450ac9f6dc4116626667d26bfb657ba"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "bb128a8b2ca348e77a9b5481e541b5a8bf82de0b"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#pragma checksum "TestFiles/Input/_ViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "778b41f9406fcda776cc3f1bf093f3b21956e582"
|
||||
namespace Asp
|
||||
namespace AspNetCore
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
|
|
|||
Loading…
Reference in New Issue