Remove razor-compiler from aspnetcore (#38706)

* Remove razor-compiler from aspnetcore

Follow up to migrate code to the dotnet/razor-compiler repo

* Fixup
This commit is contained in:
Pranav K 2021-12-01 11:10:51 -08:00 коммит произвёл GitHub
Родитель 79a1523e36
Коммит 2af03e53f1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6397 изменённых файлов: 7 добавлений и 348969 удалений

Просмотреть файл

@ -1016,60 +1016,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Runtime.Test", "src\Razor\Razor.Runtime\test\Microsoft.AspNetCore.Razor.Runtime.Test.csproj", "{ED34C082-619E-4CCB-9D26-4E2375633FA2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions", "Microsoft.AspNetCore.Mvc.Razor.Extensions", "{8BA59986-C9AA-4A78-BE18-0A344FB56D09}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj", "{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Test", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions\test\Microsoft.AspNetCore.Mvc.Razor.Extensions.Test.csproj", "{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X", "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X", "{1125B180-D389-45A0-BCE5-15ED62EDCC20}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.csproj", "{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.Test", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X\test\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.Test.csproj", "{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X", "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X", "{7114DBBC-4650-4C9C-8827-133F1FA8766F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.csproj", "{85797058-0416-4CCC-BBF2-DE8158EC3FED}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.Test", "src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X\test\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.Test.csproj", "{F48D6A08-FE52-4DDC-9232-E9693019763A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Razor.Language", "Microsoft.AspNetCore.Razor.Language", "{1CBCF1F9-D90D-484E-A2E9-FD4E4174C05E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Language", "src\Razor\Microsoft.AspNetCore.Razor.Language\src\Microsoft.AspNetCore.Razor.Language.csproj", "{A6323D64-C883-46B6-BDA9-916009D44262}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Language.Test", "src\Razor\Microsoft.AspNetCore.Razor.Language\test\Microsoft.AspNetCore.Razor.Language.Test.csproj", "{313ADEF5-5A2D-4C11-8655-E227445144E2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.CodeAnalysis.Razor", "Microsoft.CodeAnalysis.Razor", "{3854EA4A-5530-4FEC-971E-B0CB45C5B19D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Razor", "src\Razor\Microsoft.CodeAnalysis.Razor\src\Microsoft.CodeAnalysis.Razor.csproj", "{AE06A841-F90D-486A-9DEF-70495DF4D28A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Razor.Test", "src\Razor\Microsoft.CodeAnalysis.Razor\test\Microsoft.CodeAnalysis.Razor.Test.csproj", "{91A6A69B-21B4-4B05-B188-D0551573DD9B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{F6E6A63A-45BE-46BF-B9B4-DA3DDC8FE4B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Internal.Transport", "src\Razor\tools\Microsoft.AspNetCore.Razor.Internal.Transport\Microsoft.AspNetCore.Razor.Internal.Transport.csproj", "{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RazorSyntaxGenerator", "src\Razor\tools\RazorSyntaxGenerator\RazorSyntaxGenerator.csproj", "{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "perf", "perf", "{D510860C-B2DA-41D3-9137-81B029312E71}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Microbenchmarks", "src\Razor\perf\Microbenchmarks\Microsoft.AspNetCore.Razor.Microbenchmarks.csproj", "{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{06C916C7-67BF-45DC-9D0B-CEEF0C731451}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.Common", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.Common\Microsoft.AspNetCore.Razor.Test.Common.csproj", "{69637901-CAD7-4335-81F4-92E03C4DA354}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.ComponentShim", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.ComponentShim\Microsoft.AspNetCore.Razor.Test.ComponentShim.csproj", "{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.MvcShim", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim\Microsoft.AspNetCore.Razor.Test.MvcShim.csproj", "{4C152E79-DF16-4CAA-A98D-1A46604C6D22}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj", "{F8111E2B-650F-4A9A-9834-234B5F5DD79D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X.csproj", "{302EC23A-FD11-4F56-B3E9-0DEC7C177584}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test.MvcShim.Version2_X", "src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.Version2_X\Microsoft.AspNetCore.Razor.Test.MvcShim.Version2_X.csproj", "{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CF9D35EC-CA9B-481D-BAAC-5D4654732AB9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthSamples.FunctionalTests", "src\Security\test\AuthSamples.FunctionalTests\AuthSamples.FunctionalTests.csproj", "{31B7D2B1-47AF-432B-BF07-73916EF238EE}"
@ -1626,8 +1572,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client.SourceGenerator", "C
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SignalR.Client.SourceGenerator", "src\SignalR\clients\csharp\Client.SourceGenerator\src\Microsoft.AspNetCore.SignalR.Client.SourceGenerator.csproj", "{E090F82D-8345-477E-92E8-F724F08ADC56}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Internal.SourceGenerator.Transport", "src\Razor\Microsoft.AspNetCore.Razor.Internal.SourceGenerator.Transport\Microsoft.AspNetCore.Razor.Internal.SourceGenerator.Transport.csproj", "{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpClientApp", "src\Servers\Kestrel\samples\HttpClientApp\HttpClientApp.csproj", "{514726D2-3D2E-44C1-B056-163E37DE3E8B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{48526D13-69E2-4409-A57B-C3FA3C64B4F7}"
@ -6476,310 +6420,6 @@ Global
{ED34C082-619E-4CCB-9D26-4E2375633FA2}.Release|x64.Build.0 = Release|Any CPU
{ED34C082-619E-4CCB-9D26-4E2375633FA2}.Release|x86.ActiveCfg = Release|Any CPU
{ED34C082-619E-4CCB-9D26-4E2375633FA2}.Release|x86.Build.0 = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|arm64.ActiveCfg = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|arm64.Build.0 = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|x64.ActiveCfg = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|x64.Build.0 = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|x86.ActiveCfg = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Debug|x86.Build.0 = Debug|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|Any CPU.Build.0 = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|arm64.ActiveCfg = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|arm64.Build.0 = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|x64.ActiveCfg = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|x64.Build.0 = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|x86.ActiveCfg = Release|Any CPU
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E}.Release|x86.Build.0 = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|arm64.ActiveCfg = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|arm64.Build.0 = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|x64.ActiveCfg = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|x64.Build.0 = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|x86.ActiveCfg = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Debug|x86.Build.0 = Debug|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|Any CPU.Build.0 = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|arm64.ActiveCfg = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|arm64.Build.0 = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|x64.ActiveCfg = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|x64.Build.0 = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|x86.ActiveCfg = Release|Any CPU
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78}.Release|x86.Build.0 = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|arm64.ActiveCfg = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|arm64.Build.0 = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|x64.ActiveCfg = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|x64.Build.0 = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|x86.ActiveCfg = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Debug|x86.Build.0 = Debug|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|Any CPU.Build.0 = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|arm64.ActiveCfg = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|arm64.Build.0 = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|x64.ActiveCfg = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|x64.Build.0 = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|x86.ActiveCfg = Release|Any CPU
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D}.Release|x86.Build.0 = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|arm64.ActiveCfg = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|arm64.Build.0 = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|x64.ActiveCfg = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|x64.Build.0 = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|x86.ActiveCfg = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Debug|x86.Build.0 = Debug|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|Any CPU.Build.0 = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|arm64.ActiveCfg = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|arm64.Build.0 = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|x64.ActiveCfg = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|x64.Build.0 = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|x86.ActiveCfg = Release|Any CPU
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0}.Release|x86.Build.0 = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|arm64.ActiveCfg = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|arm64.Build.0 = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|x64.ActiveCfg = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|x64.Build.0 = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|x86.ActiveCfg = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Debug|x86.Build.0 = Debug|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|Any CPU.Build.0 = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|arm64.ActiveCfg = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|arm64.Build.0 = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|x64.ActiveCfg = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|x64.Build.0 = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|x86.ActiveCfg = Release|Any CPU
{85797058-0416-4CCC-BBF2-DE8158EC3FED}.Release|x86.Build.0 = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|arm64.ActiveCfg = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|arm64.Build.0 = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|x64.ActiveCfg = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|x64.Build.0 = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Debug|x86.Build.0 = Debug|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|Any CPU.Build.0 = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|arm64.ActiveCfg = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|arm64.Build.0 = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|x64.ActiveCfg = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|x64.Build.0 = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|x86.ActiveCfg = Release|Any CPU
{F48D6A08-FE52-4DDC-9232-E9693019763A}.Release|x86.Build.0 = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|arm64.ActiveCfg = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|arm64.Build.0 = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|x64.ActiveCfg = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|x64.Build.0 = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|x86.ActiveCfg = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Debug|x86.Build.0 = Debug|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|Any CPU.Build.0 = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|arm64.ActiveCfg = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|arm64.Build.0 = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|x64.ActiveCfg = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|x64.Build.0 = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|x86.ActiveCfg = Release|Any CPU
{A6323D64-C883-46B6-BDA9-916009D44262}.Release|x86.Build.0 = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|arm64.ActiveCfg = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|arm64.Build.0 = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|x64.ActiveCfg = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|x64.Build.0 = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|x86.ActiveCfg = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Debug|x86.Build.0 = Debug|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|Any CPU.Build.0 = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|arm64.ActiveCfg = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|arm64.Build.0 = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|x64.ActiveCfg = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|x64.Build.0 = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|x86.ActiveCfg = Release|Any CPU
{313ADEF5-5A2D-4C11-8655-E227445144E2}.Release|x86.Build.0 = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|arm64.ActiveCfg = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|arm64.Build.0 = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|x64.ActiveCfg = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|x64.Build.0 = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|x86.ActiveCfg = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Debug|x86.Build.0 = Debug|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|Any CPU.Build.0 = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|arm64.ActiveCfg = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|arm64.Build.0 = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|x64.ActiveCfg = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|x64.Build.0 = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|x86.ActiveCfg = Release|Any CPU
{AE06A841-F90D-486A-9DEF-70495DF4D28A}.Release|x86.Build.0 = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|arm64.ActiveCfg = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|arm64.Build.0 = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|x64.ActiveCfg = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|x64.Build.0 = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|x86.ActiveCfg = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Debug|x86.Build.0 = Debug|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|Any CPU.Build.0 = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|arm64.ActiveCfg = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|arm64.Build.0 = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|x64.ActiveCfg = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|x64.Build.0 = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|x86.ActiveCfg = Release|Any CPU
{91A6A69B-21B4-4B05-B188-D0551573DD9B}.Release|x86.Build.0 = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|arm64.ActiveCfg = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|arm64.Build.0 = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|x64.ActiveCfg = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|x64.Build.0 = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|x86.ActiveCfg = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Debug|x86.Build.0 = Debug|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|Any CPU.Build.0 = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|arm64.ActiveCfg = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|arm64.Build.0 = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|x64.ActiveCfg = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|x64.Build.0 = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|x86.ActiveCfg = Release|Any CPU
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0}.Release|x86.Build.0 = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|arm64.ActiveCfg = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|arm64.Build.0 = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|x64.ActiveCfg = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|x64.Build.0 = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|x86.ActiveCfg = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Debug|x86.Build.0 = Debug|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|Any CPU.Build.0 = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|arm64.ActiveCfg = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|arm64.Build.0 = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|x64.ActiveCfg = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|x64.Build.0 = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|x86.ActiveCfg = Release|Any CPU
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC}.Release|x86.Build.0 = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|arm64.ActiveCfg = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|arm64.Build.0 = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|x64.ActiveCfg = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|x64.Build.0 = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|x86.ActiveCfg = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Debug|x86.Build.0 = Debug|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|Any CPU.Build.0 = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|arm64.ActiveCfg = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|arm64.Build.0 = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|x64.ActiveCfg = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|x64.Build.0 = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|x86.ActiveCfg = Release|Any CPU
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A}.Release|x86.Build.0 = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|arm64.ActiveCfg = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|arm64.Build.0 = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|x64.ActiveCfg = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|x64.Build.0 = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|x86.ActiveCfg = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Debug|x86.Build.0 = Debug|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|Any CPU.Build.0 = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|arm64.ActiveCfg = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|arm64.Build.0 = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|x64.ActiveCfg = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|x64.Build.0 = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|x86.ActiveCfg = Release|Any CPU
{69637901-CAD7-4335-81F4-92E03C4DA354}.Release|x86.Build.0 = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|arm64.ActiveCfg = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|arm64.Build.0 = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|x64.ActiveCfg = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|x64.Build.0 = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|x86.ActiveCfg = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Debug|x86.Build.0 = Debug|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|Any CPU.Build.0 = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|arm64.ActiveCfg = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|arm64.Build.0 = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|x64.ActiveCfg = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|x64.Build.0 = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|x86.ActiveCfg = Release|Any CPU
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F}.Release|x86.Build.0 = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|arm64.ActiveCfg = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|arm64.Build.0 = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|x64.ActiveCfg = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|x64.Build.0 = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|x86.ActiveCfg = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Debug|x86.Build.0 = Debug|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|Any CPU.Build.0 = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|arm64.ActiveCfg = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|arm64.Build.0 = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|x64.ActiveCfg = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|x64.Build.0 = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|x86.ActiveCfg = Release|Any CPU
{4C152E79-DF16-4CAA-A98D-1A46604C6D22}.Release|x86.Build.0 = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|arm64.ActiveCfg = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|arm64.Build.0 = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|x64.ActiveCfg = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|x64.Build.0 = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|x86.ActiveCfg = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Debug|x86.Build.0 = Debug|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|Any CPU.Build.0 = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|arm64.ActiveCfg = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|arm64.Build.0 = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|x64.ActiveCfg = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|x64.Build.0 = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|x86.ActiveCfg = Release|Any CPU
{F8111E2B-650F-4A9A-9834-234B5F5DD79D}.Release|x86.Build.0 = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|Any CPU.Build.0 = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|arm64.ActiveCfg = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|arm64.Build.0 = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|x64.ActiveCfg = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|x64.Build.0 = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|x86.ActiveCfg = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Debug|x86.Build.0 = Debug|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|Any CPU.ActiveCfg = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|Any CPU.Build.0 = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|arm64.ActiveCfg = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|arm64.Build.0 = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|x64.ActiveCfg = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|x64.Build.0 = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|x86.ActiveCfg = Release|Any CPU
{302EC23A-FD11-4F56-B3E9-0DEC7C177584}.Release|x86.Build.0 = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|arm64.ActiveCfg = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|arm64.Build.0 = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|x64.Build.0 = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Debug|x86.Build.0 = Debug|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|Any CPU.Build.0 = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|arm64.ActiveCfg = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|arm64.Build.0 = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|x64.ActiveCfg = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|x64.Build.0 = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|x86.ActiveCfg = Release|Any CPU
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4}.Release|x86.Build.0 = Release|Any CPU
{31B7D2B1-47AF-432B-BF07-73916EF238EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31B7D2B1-47AF-432B-BF07-73916EF238EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31B7D2B1-47AF-432B-BF07-73916EF238EE}.Debug|arm64.ActiveCfg = Debug|Any CPU
@ -9838,22 +9478,6 @@ Global
{E090F82D-8345-477E-92E8-F724F08ADC56}.Release|x64.Build.0 = Release|Any CPU
{E090F82D-8345-477E-92E8-F724F08ADC56}.Release|x86.ActiveCfg = Release|Any CPU
{E090F82D-8345-477E-92E8-F724F08ADC56}.Release|x86.Build.0 = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|arm64.ActiveCfg = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|arm64.Build.0 = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|x64.ActiveCfg = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|x64.Build.0 = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|x86.ActiveCfg = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Debug|x86.Build.0 = Debug|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|Any CPU.Build.0 = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|arm64.ActiveCfg = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|arm64.Build.0 = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|x64.ActiveCfg = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|x64.Build.0 = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|x86.ActiveCfg = Release|Any CPU
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C}.Release|x86.Build.0 = Release|Any CPU
{514726D2-3D2E-44C1-B056-163E37DE3E8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{514726D2-3D2E-44C1-B056-163E37DE3E8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{514726D2-3D2E-44C1-B056-163E37DE3E8B}.Debug|arm64.ActiveCfg = Debug|Any CPU
@ -10808,33 +10432,6 @@ Global
{3163C56E-99BC-4BD1-8880-4F94A2407741} = {F1A6BA04-853E-43B5-B27E-54558603837B}
{776BFCDC-8591-4E3D-BD0D-858A188A033D} = {66A0F71A-FFB5-4763-913E-FB4A4F17EAA2}
{ED34C082-619E-4CCB-9D26-4E2375633FA2} = {AB316CF4-D9C3-427E-8460-7C5235BED45E}
{8BA59986-C9AA-4A78-BE18-0A344FB56D09} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{2FD6D363-367E-4AAF-BCFE-FC9C3B091B3E} = {8BA59986-C9AA-4A78-BE18-0A344FB56D09}
{6FCEE9BC-11C2-4790-8C13-DF81EBCD4E78} = {8BA59986-C9AA-4A78-BE18-0A344FB56D09}
{1125B180-D389-45A0-BCE5-15ED62EDCC20} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{1D628BD5-DC80-4E19-9DBB-58A9F58CF70D} = {1125B180-D389-45A0-BCE5-15ED62EDCC20}
{FAA22AA9-CF42-4FAB-8C11-1A3B52546FE0} = {1125B180-D389-45A0-BCE5-15ED62EDCC20}
{7114DBBC-4650-4C9C-8827-133F1FA8766F} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{85797058-0416-4CCC-BBF2-DE8158EC3FED} = {7114DBBC-4650-4C9C-8827-133F1FA8766F}
{F48D6A08-FE52-4DDC-9232-E9693019763A} = {7114DBBC-4650-4C9C-8827-133F1FA8766F}
{1CBCF1F9-D90D-484E-A2E9-FD4E4174C05E} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{A6323D64-C883-46B6-BDA9-916009D44262} = {1CBCF1F9-D90D-484E-A2E9-FD4E4174C05E}
{313ADEF5-5A2D-4C11-8655-E227445144E2} = {1CBCF1F9-D90D-484E-A2E9-FD4E4174C05E}
{3854EA4A-5530-4FEC-971E-B0CB45C5B19D} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{AE06A841-F90D-486A-9DEF-70495DF4D28A} = {3854EA4A-5530-4FEC-971E-B0CB45C5B19D}
{91A6A69B-21B4-4B05-B188-D0551573DD9B} = {3854EA4A-5530-4FEC-971E-B0CB45C5B19D}
{F6E6A63A-45BE-46BF-B9B4-DA3DDC8FE4B5} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{C3E588B7-AF20-448E-BAF0-D47C29B2E4B0} = {F6E6A63A-45BE-46BF-B9B4-DA3DDC8FE4B5}
{8B37B987-B7A2-4A26-8CF1-7AC1E9FA7ADC} = {F6E6A63A-45BE-46BF-B9B4-DA3DDC8FE4B5}
{D510860C-B2DA-41D3-9137-81B029312E71} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{8ED505A5-A33A-401E-89BA-3AED7B73DD6A} = {D510860C-B2DA-41D3-9137-81B029312E71}
{06C916C7-67BF-45DC-9D0B-CEEF0C731451} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{69637901-CAD7-4335-81F4-92E03C4DA354} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{ED060C25-B7B2-414B-BDC7-A77FA0269C9F} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{4C152E79-DF16-4CAA-A98D-1A46604C6D22} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{F8111E2B-650F-4A9A-9834-234B5F5DD79D} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{302EC23A-FD11-4F56-B3E9-0DEC7C177584} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{2A3B2388-F9F3-4F28-B008-2CD7862A86C4} = {06C916C7-67BF-45DC-9D0B-CEEF0C731451}
{CF9D35EC-CA9B-481D-BAAC-5D4654732AB9} = {A39335E5-7A26-4CFD-BF3B-2CFE75113498}
{31B7D2B1-47AF-432B-BF07-73916EF238EE} = {CF9D35EC-CA9B-481D-BAAC-5D4654732AB9}
{C75B1FB3-6BB7-411A-B76C-06E5E0C3D957} = {A39335E5-7A26-4CFD-BF3B-2CFE75113498}
@ -11112,7 +10709,6 @@ Global
{17459B97-1AA3-4154-83D3-C6BDC9FA3F85} = {022B4B80-E813-4256-8034-11A68146F4EF}
{4FC50620-4C8B-495F-859C-BFACAD158033} = {2637A22F-182F-4659-A394-C9BC1514B321}
{E090F82D-8345-477E-92E8-F724F08ADC56} = {4FC50620-4C8B-495F-859C-BFACAD158033}
{247E7B6F-FBA2-41A9-BA03-C7C4DF28091C} = {B27FBAC2-ADA3-4A05-B232-64011B6B2DA3}
{514726D2-3D2E-44C1-B056-163E37DE3E8B} = {7B976D8F-EA31-4C0B-97BD-DFD9B3CC86FB}
{48526D13-69E2-4409-A57B-C3FA3C64B4F7} = {9F21A235-436E-4020-A076-1DF4F89D0CA0}
{835A4E0F-A697-4B69-9736-3E99D163C4B9} = {48526D13-69E2-4409-A57B-C3FA3C64B4F7}

Просмотреть файл

@ -13,12 +13,15 @@ and are generated based on the last package release.
</PropertyGroup>
<ItemGroup Label=".NET team dependencies">
<LatestPackageReference Include="Microsoft.AspNetCore.Razor.Language" />
<LatestPackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" />
<LatestPackageReference Include="Microsoft.Azure.SignalR" />
<LatestPackageReference Include="Microsoft.Bcl.HashCode" />
<LatestPackageReference Include="Microsoft.Css.Parser" />
<LatestPackageReference Include="Microsoft.CodeAnalysis.Common" />
<LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
<LatestPackageReference Include="Microsoft.CodeAnalysis.CSharp" />
<LatestPackageReference Include="Microsoft.CodeAnalysis.Razor" />
<LatestPackageReference Include="Microsoft.CSharp" />
<LatestPackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
<LatestPackageReference Include="Microsoft.Extensions.Caching.Memory" />

Просмотреть файл

@ -98,11 +98,6 @@
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SpaServices.Extensions" ProjectPath="$(RepoRoot)src\Middleware\Spa\SpaServices.Extensions\src\Microsoft.AspNetCore.SpaServices.Extensions.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.StaticFiles" ProjectPath="$(RepoRoot)src\Middleware\StaticFiles\src\Microsoft.AspNetCore.StaticFiles.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.WebSockets" ProjectPath="$(RepoRoot)src\Middleware\WebSockets\src\Microsoft.AspNetCore.WebSockets.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor.Language" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Razor.Language\src\Microsoft.AspNetCore.Razor.Language.csproj" />
<ProjectReferenceProvider Include="Microsoft.CodeAnalysis.Razor" ProjectPath="$(RepoRoot)src\Razor\Microsoft.CodeAnalysis.Razor\src\Microsoft.CodeAnalysis.Razor.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor.Runtime" ProjectPath="$(RepoRoot)src\Razor\Razor.Runtime\src\Microsoft.AspNetCore.Razor.Runtime.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor" ProjectPath="$(RepoRoot)src\Razor\Razor\src\Microsoft.AspNetCore.Razor.csproj" />
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Abstractions" ProjectPath="$(RepoRoot)src\Mvc\Mvc.Abstractions\src\Microsoft.AspNetCore.Mvc.Abstractions.csproj" />

Просмотреть файл

@ -173,7 +173,9 @@
<SystemValueTupleVersion>4.5.0</SystemValueTupleVersion>
<!-- Packages developed by @aspnet, but manually updated as necessary. -->
<MicrosoftAspNetWebApiClientVersion>5.2.6</MicrosoftAspNetWebApiClientVersion>
<MonoWebAssemblyInteropVersion>3.1.1-preview4.19614.4</MonoWebAssemblyInteropVersion>
<MicrosoftAspNetCoreRazorLanguageVersion>6.0.0</MicrosoftAspNetCoreRazorLanguageVersion>
<MicrosoftAspNetCoreMvcRazorExtensionsVersion>6.0.0</MicrosoftAspNetCoreMvcRazorExtensionsVersion>
<MicrosoftCodeAnalysisRazorVersion>6.0.0</MicrosoftCodeAnalysisRazorVersion>
<!-- Partner teams -->
<MicrosoftBclAsyncInterfacesVersion>1.0.0</MicrosoftBclAsyncInterfacesVersion>
<MicrosoftBCLHashCodeVersion>1.1.1</MicrosoftBCLHashCodeVersion>

Просмотреть файл

@ -77,9 +77,6 @@
"src\\Mvc\\Mvc.ViewFeatures\\src\\Microsoft.AspNetCore.Mvc.ViewFeatures.csproj",
"src\\Mvc\\Mvc\\src\\Microsoft.AspNetCore.Mvc.csproj",
"src\\ObjectPool\\src\\Microsoft.Extensions.ObjectPool.csproj",
"src\\Razor\\Microsoft.AspNetCore.Mvc.Razor.Extensions\\src\\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj",
"src\\Razor\\Microsoft.AspNetCore.Razor.Language\\src\\Microsoft.AspNetCore.Razor.Language.csproj",
"src\\Razor\\Microsoft.CodeAnalysis.Razor\\src\\Microsoft.CodeAnalysis.Razor.csproj",
"src\\Razor\\Razor.Runtime\\src\\Microsoft.AspNetCore.Razor.Runtime.csproj",
"src\\Razor\\Razor\\src\\Microsoft.AspNetCore.Razor.csproj",
"src\\Security\\Authentication\\Cookies\\src\\Microsoft.AspNetCore.Authentication.Cookies.csproj",

Просмотреть файл

@ -1,75 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Globalization;
using System.Text;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal static class CSharpIdentifier
{
private const string CshtmlExtension = ".cshtml";
public static string GetClassNameFromPath(string path)
{
if (string.IsNullOrEmpty(path))
{
return path;
}
if (path.EndsWith(CshtmlExtension, StringComparison.OrdinalIgnoreCase))
{
path = path.Substring(0, path.Length - CshtmlExtension.Length);
}
return SanitizeClassName(path);
}
// CSharp Spec §2.4.2
private static bool IsIdentifierStart(char character)
{
return char.IsLetter(character) ||
character == '_' ||
CharUnicodeInfo.GetUnicodeCategory(character) == UnicodeCategory.LetterNumber;
}
public static bool IsIdentifierPart(char character)
{
return char.IsDigit(character) ||
IsIdentifierStart(character) ||
IsIdentifierPartByUnicodeCategory(character);
}
private static bool IsIdentifierPartByUnicodeCategory(char character)
{
var category = CharUnicodeInfo.GetUnicodeCategory(character);
return category == UnicodeCategory.NonSpacingMark || // Mn
category == UnicodeCategory.SpacingCombiningMark || // Mc
category == UnicodeCategory.ConnectorPunctuation || // Pc
category == UnicodeCategory.Format; // Cf
}
public static string SanitizeClassName(string inputName)
{
if (string.IsNullOrEmpty(inputName))
{
return inputName;
}
if (!IsIdentifierStart(inputName[0]) && IsIdentifierPart(inputName[0]))
{
inputName = "_" + inputName;
}
var builder = new StringBuilder(inputName.Length);
for (var i = 0; i < inputName.Length; i++)
{
var ch = inputName[i];
builder.Append(IsIdentifierPart(ch) ? ch : '_');
}
return builder.ToString();
}
}

Просмотреть файл

@ -1,28 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class ExtensionInitializer : RazorExtensionInitializer
{
public override void Initialize(RazorProjectEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
if (builder.Configuration.ConfigurationName == "MVC-1.0")
{
RazorExtensions.Register(builder);
}
else if (builder.Configuration.ConfigurationName == "MVC-1.1")
{
RazorExtensions.Register(builder);
RazorExtensions.RegisterViewComponentTagHelpers(builder);
}
}
}

Просмотреть файл

@ -1,11 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public interface IInjectTargetExtension : ICodeTargetExtension
{
void WriteInjectProperty(CodeRenderingContext context, InjectIntermediateNode node);
}

Просмотреть файл

@ -1,11 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public interface IViewComponentTagHelperTargetExtension : ICodeTargetExtension
{
void WriteViewComponentTagHelper(CodeRenderingContext context, ViewComponentTagHelperIntermediateNode node);
}

Просмотреть файл

@ -1,123 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class InjectDirective
{
public static readonly DirectiveDescriptor Directive = DirectiveDescriptor.CreateDirective(
"inject",
DirectiveKind.SingleLine,
builder =>
{
builder
.AddTypeToken(Resources.InjectDirective_TypeToken_Name, Resources.InjectDirective_TypeToken_Description)
.AddMemberToken(Resources.InjectDirective_MemberToken_Name, Resources.InjectDirective_MemberToken_Description);
builder.Usage = DirectiveUsage.FileScopedMultipleOccurring;
builder.Description = Resources.InjectDirective_Description;
});
public static RazorProjectEngineBuilder Register(RazorProjectEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
builder.AddDirective(Directive);
builder.Features.Add(new Pass());
builder.AddTargetExtension(new InjectTargetExtension());
return builder;
}
internal class Pass : IntermediateNodePassBase, IRazorDirectiveClassifierPass
{
// Runs after the @model and @namespace directives
public override int Order => 10;
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
{
var visitor = new Visitor();
visitor.Visit(documentNode);
var modelType = ModelDirective.GetModelType(documentNode);
var properties = new HashSet<string>(StringComparer.Ordinal);
for (var i = visitor.Directives.Count - 1; i >= 0; i--)
{
var directive = visitor.Directives[i];
var tokens = directive.Tokens.ToArray();
if (tokens.Length < 2)
{
continue;
}
var typeName = tokens[0].Content;
var memberName = tokens[1].Content;
if (!properties.Add(memberName))
{
continue;
}
typeName = typeName.Replace("<TModel>", "<" + modelType + ">");
var injectNode = new InjectIntermediateNode()
{
TypeName = typeName,
MemberName = memberName,
};
visitor.Class.Children.Add(injectNode);
}
}
}
private class Visitor : IntermediateNodeWalker
{
public ClassDeclarationIntermediateNode Class { get; private set; }
public IList<DirectiveIntermediateNode> Directives { get; } = new List<DirectiveIntermediateNode>();
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
{
if (Class == null)
{
Class = node;
}
base.VisitClassDeclaration(node);
}
public override void VisitDirective(DirectiveIntermediateNode node)
{
if (node.Directive == Directive)
{
Directives.Add(node);
}
}
}
#region Obsolete
[Obsolete("This method is obsolete and will be removed in a future version.")]
public static IRazorEngineBuilder Register(IRazorEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
builder.AddDirective(Directive);
builder.Features.Add(new Pass());
builder.AddTargetExtension(new InjectTargetExtension());
return builder;
}
#endregion
}

Просмотреть файл

@ -1,58 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class InjectIntermediateNode : ExtensionIntermediateNode
{
public string TypeName { get; set; }
public string MemberName { get; set; }
public override IntermediateNodeCollection Children => IntermediateNodeCollection.ReadOnly;
public override void Accept(IntermediateNodeVisitor visitor)
{
if (visitor == null)
{
throw new ArgumentNullException(nameof(visitor));
}
AcceptExtensionNode<InjectIntermediateNode>(this, visitor);
}
public override void WriteNode(CodeTarget target, CodeRenderingContext context)
{
if (target == null)
{
throw new ArgumentNullException(nameof(target));
}
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var extension = target.GetExtension<IInjectTargetExtension>();
if (extension == null)
{
ReportMissingCodeTargetExtension<IInjectTargetExtension>(context);
return;
}
extension.WriteInjectProperty(context, this);
}
public override void FormatNode(IntermediateNodeFormatter formatter)
{
formatter.WriteContent(MemberName);
formatter.WriteProperty(nameof(MemberName), MemberName);
formatter.WriteProperty(nameof(TypeName), TypeName);
}
}

Просмотреть файл

@ -1,43 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class InjectTargetExtension : IInjectTargetExtension
{
private const string RazorInjectAttribute = "[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]";
public void WriteInjectProperty(CodeRenderingContext context, InjectIntermediateNode node)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
if (node == null)
{
throw new ArgumentNullException(nameof(node));
}
var property = $"public {node.TypeName} {node.MemberName} {{ get; private set; }}";
if (node.Source.HasValue)
{
using (context.CodeWriter.BuildLinePragma(node.Source.Value, context))
{
context.CodeWriter
.WriteLine(RazorInjectAttribute)
.WriteLine(property);
}
}
else
{
context.CodeWriter
.WriteLine(RazorInjectAttribute)
.WriteLine(property);
}
}
}

Просмотреть файл

@ -1,31 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Razor.Language.Extensions;
internal class LegacySectionTargetExtension : ISectionTargetExtension
{
private const string DefaultWriterName = "__razor_section_writer";
public const string DefaultSectionMethodName = "DefineSection";
public string SectionMethodName { get; set; } = DefaultSectionMethodName;
public void WriteSection(CodeRenderingContext context, SectionIntermediateNode node)
{
context.CodeWriter
.WriteStartMethodInvocation(SectionMethodName)
.Write("\"")
.Write(node.SectionName)
.Write("\", ");
using (context.CodeWriter.BuildAsyncLambda(DefaultWriterName))
{
context.RenderChildren(node);
}
context.CodeWriter.WriteEndMethodInvocation(endLine: true);
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>ASP.NET Core design time hosting infrastructure for the Razor view engine.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);aspnetcoremvc</PackageTags>
<PublishWindowsPdb>true</PublishWindowsPdb>
<IsShipping>false</IsShipping>
<!-- Need to build this project in source build -->
<ExcludeFromSourceBuild>false</ExcludeFromSourceBuild>
<!-- No need to track public APIs of this design-time build infrastructure. -->
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Microsoft.AspNetCore.Razor.Language\src\CodeGeneration\CodeWriterExtensions.cs">
<Link>Shared\CodeWriterExtensions.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Razor.Language" />
<Reference Include="Microsoft.CodeAnalysis.Razor" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,144 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class ModelDirective
{
public static readonly DirectiveDescriptor Directive = DirectiveDescriptor.CreateDirective(
"model",
DirectiveKind.SingleLine,
builder =>
{
builder.AddTypeToken(Resources.ModelDirective_TypeToken_Name, Resources.ModelDirective_TypeToken_Description);
builder.Usage = DirectiveUsage.FileScopedSinglyOccurring;
builder.Description = Resources.ModelDirective_Description;
});
public static RazorProjectEngineBuilder Register(RazorProjectEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
builder.AddDirective(Directive);
builder.Features.Add(new Pass());
return builder;
}
public static string GetModelType(DocumentIntermediateNode document)
{
if (document == null)
{
throw new ArgumentNullException(nameof(document));
}
var visitor = new Visitor();
return GetModelType(document, visitor);
}
private static string GetModelType(DocumentIntermediateNode document, Visitor visitor)
{
visitor.Visit(document);
for (var i = visitor.ModelDirectives.Count - 1; i >= 0; i--)
{
var directive = visitor.ModelDirectives[i];
var tokens = directive.Tokens.ToArray();
if (tokens.Length >= 1)
{
return tokens[0].Content;
}
}
return "dynamic";
}
internal class Pass : IntermediateNodePassBase, IRazorDirectiveClassifierPass
{
// Runs after the @inherits directive
public override int Order => 5;
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
{
var visitor = new Visitor();
var modelType = GetModelType(documentNode, visitor);
if (documentNode.Options.DesignTime)
{
// Alias the TModel token to a known type.
// This allows design time compilation to succeed for Razor files where the token isn't replaced.
var typeName = $"global::{typeof(object).FullName}";
var usingNode = new UsingDirectiveIntermediateNode()
{
Content = $"TModel = {typeName}"
};
visitor.Namespace?.Children.Insert(0, usingNode);
}
var baseType = visitor.Class?.BaseType?.Replace("<TModel>", "<" + modelType + ">");
visitor.Class.BaseType = baseType;
}
}
private class Visitor : IntermediateNodeWalker
{
public NamespaceDeclarationIntermediateNode Namespace { get; private set; }
public ClassDeclarationIntermediateNode Class { get; private set; }
public IList<DirectiveIntermediateNode> ModelDirectives { get; } = new List<DirectiveIntermediateNode>();
public override void VisitNamespaceDeclaration(NamespaceDeclarationIntermediateNode node)
{
if (Namespace == null)
{
Namespace = node;
}
base.VisitNamespaceDeclaration(node);
}
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
{
if (Class == null)
{
Class = node;
}
base.VisitClassDeclaration(node);
}
public override void VisitDirective(DirectiveIntermediateNode node)
{
if (node.Directive == Directive)
{
ModelDirectives.Add(node);
}
}
}
#region Obsolete
[Obsolete("This method is obsolete and will be removed in a future version.")]
public static IRazorEngineBuilder Register(IRazorEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
builder.AddDirective(Directive);
builder.Features.Add(new Pass());
return builder;
}
#endregion
}

Просмотреть файл

@ -1,84 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class ModelExpressionPass : IntermediateNodePassBase, IRazorOptimizationPass
{
private const string ModelExpressionTypeName = "Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression";
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
{
var visitor = new Visitor();
visitor.Visit(documentNode);
}
private class Visitor : IntermediateNodeWalker
{
public List<TagHelperIntermediateNode> TagHelpers { get; } = new List<TagHelperIntermediateNode>();
public override void VisitTagHelperProperty(TagHelperPropertyIntermediateNode node)
{
if (string.Equals(node.BoundAttribute.TypeName, ModelExpressionTypeName, StringComparison.Ordinal) ||
(node.IsIndexerNameMatch &&
string.Equals(node.BoundAttribute.IndexerTypeName, ModelExpressionTypeName, StringComparison.Ordinal)))
{
var expression = new CSharpExpressionIntermediateNode();
expression.Children.Add(new IntermediateToken()
{
Kind = TokenKind.CSharp,
Content = "ModelExpressionProvider.CreateModelExpression(ViewData, __model => ",
});
if (node.Children.Count == 1 && node.Children[0] is IntermediateToken token && token.IsCSharp)
{
// A 'simple' expression will look like __model => __model.Foo
expression.Children.Add(new IntermediateToken()
{
Kind = TokenKind.CSharp,
Content = "__model."
});
expression.Children.Add(token);
}
else
{
for (var i = 0; i < node.Children.Count; i++)
{
if (node.Children[i] is CSharpExpressionIntermediateNode nestedExpression)
{
for (var j = 0; j < nestedExpression.Children.Count; j++)
{
if (nestedExpression.Children[j] is IntermediateToken cSharpToken &&
cSharpToken.IsCSharp)
{
expression.Children.Add(cSharpToken);
}
}
continue;
}
}
}
expression.Children.Add(new IntermediateToken()
{
Kind = TokenKind.CSharp,
Content = ")",
});
node.Children.Clear();
node.Children.Add(expression);
}
}
}
}

Просмотреть файл

@ -1,94 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class MvcImportProjectFeature : RazorProjectEngineFeatureBase, IImportProjectFeature
{
private const string ImportsFileName = "_ViewImports.cshtml";
public IReadOnlyList<RazorProjectItem> GetImports(RazorProjectItem projectItem)
{
if (projectItem == null)
{
throw new ArgumentNullException(nameof(projectItem));
}
// Don't add MVC imports for a component - this shouldn't happen for v1, but just in case.
if (FileKinds.IsComponent(projectItem.FileKind))
{
return Array.Empty<RazorProjectItem>();
}
var imports = new List<RazorProjectItem>();
AddDefaultDirectivesImport(imports);
// We add hierarchical imports second so any default directive imports can be overridden.
AddHierarchicalImports(projectItem, imports);
return imports;
}
// Internal for testing
internal static void AddDefaultDirectivesImport(List<RazorProjectItem> imports)
{
imports.Add(DefaultDirectivesProjectItem.Instance);
}
// Internal for testing
internal void AddHierarchicalImports(RazorProjectItem projectItem, List<RazorProjectItem> imports)
{
// We want items in descending order. FindHierarchicalItems returns items in ascending order.
var importProjectItems = ProjectEngine.FileSystem.FindHierarchicalItems(projectItem.FilePath, ImportsFileName).Reverse();
imports.AddRange(importProjectItems);
}
private class DefaultDirectivesProjectItem : RazorProjectItem
{
private readonly byte[] _defaultImportBytes;
private DefaultDirectivesProjectItem()
{
var preamble = Encoding.UTF8.GetPreamble();
var content = @"
@using System
@using System.Collections.Generic
@using System.Linq
@using System.Threading.Tasks
@using Microsoft.AspNetCore.Mvc
@using Microsoft.AspNetCore.Mvc.Rendering
@using Microsoft.AspNetCore.Mvc.ViewFeatures
@inject global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> Html
@inject global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json
@inject global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component
@inject global::Microsoft.AspNetCore.Mvc.IUrlHelper Url
@inject global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider
@addTagHelper Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper, Microsoft.AspNetCore.Mvc.Razor
";
var contentBytes = Encoding.UTF8.GetBytes(content);
_defaultImportBytes = new byte[preamble.Length + contentBytes.Length];
preamble.CopyTo(_defaultImportBytes, 0);
contentBytes.CopyTo(_defaultImportBytes, preamble.Length);
}
public override string BasePath => null;
public override string FilePath => null;
public override string PhysicalPath => null;
public override bool Exists => true;
public static DefaultDirectivesProjectItem Instance { get; } = new DefaultDirectivesProjectItem();
public override Stream Read() => new MemoryStream(_defaultImportBytes);
}
}

Просмотреть файл

@ -1,71 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Globalization;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class MvcViewDocumentClassifierPass : DocumentClassifierPassBase
{
public static readonly string MvcViewDocumentKind = "mvc.1.0.view";
protected override string DocumentKind => MvcViewDocumentKind;
protected override bool IsMatch(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) => true;
protected override void OnDocumentStructureCreated(
RazorCodeDocument codeDocument,
NamespaceDeclarationIntermediateNode @namespace,
ClassDeclarationIntermediateNode @class,
MethodDeclarationIntermediateNode method)
{
base.OnDocumentStructureCreated(codeDocument, @namespace, @class, method);
@namespace.Content = "AspNetCore";
var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath;
if (string.IsNullOrEmpty(filePath))
{
// It's possible for a Razor document to not have a file path.
// Eg. When we try to generate code for an in memory document like default imports.
var checksum = BytesToString(codeDocument.Source.GetChecksum());
@class.ClassName = $"AspNetCore_{checksum}";
}
else
{
@class.ClassName = CSharpIdentifier.GetClassNameFromPath(filePath);
}
@class.BaseType = "global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>";
@class.Modifiers.Clear();
@class.Modifiers.Add("public");
method.MethodName = "ExecuteAsync";
method.Modifiers.Clear();
method.Modifiers.Add("public");
method.Modifiers.Add("async");
method.Modifiers.Add("override");
method.ReturnType = $"global::{typeof(System.Threading.Tasks.Task).FullName}";
}
private static string BytesToString(byte[] bytes)
{
if (bytes == null)
{
throw new ArgumentNullException(nameof(bytes));
}
var result = new StringBuilder(bytes.Length);
for (var i = 0; i < bytes.Length; i++)
{
// The x2 format means lowercase hex, where each byte is a 2-character string.
result.Append(bytes[i].ToString("x2", CultureInfo.InvariantCulture));
}
return result.ToString();
}
}

Просмотреть файл

@ -1,11 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
using Microsoft.AspNetCore.Razor.Language;
[assembly: ProvideRazorExtensionInitializer("MVC-1.0", typeof(ExtensionInitializer))]
[assembly: ProvideRazorExtensionInitializer("MVC-1.1", typeof(ExtensionInitializer))]
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

Просмотреть файл

@ -1,120 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Razor;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class RazorExtensions
{
public static void Register(RazorProjectEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
InjectDirective.Register(builder);
ModelDirective.Register(builder);
InheritsDirective.Register(builder);
builder.Features.Add(new DefaultTagHelperDescriptorProvider());
// Register section directive with the 1.x compatible target extension.
builder.AddDirective(SectionDirective.Directive);
builder.Features.Add(new SectionDirectivePass());
builder.AddTargetExtension(new LegacySectionTargetExtension());
builder.AddTargetExtension(new TemplateTargetExtension()
{
TemplateTypeName = "global::Microsoft.AspNetCore.Mvc.Razor.HelperResult",
});
builder.Features.Add(new ModelExpressionPass());
builder.Features.Add(new MvcViewDocumentClassifierPass());
builder.Features.Add(new MvcImportProjectFeature());
// The default C# language version for what this Razor configuration supports.
builder.SetCSharpLanguageVersion(LanguageVersion.CSharp7_3);
}
public static void RegisterViewComponentTagHelpers(RazorProjectEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
builder.Features.Add(new ViewComponentTagHelperDescriptorProvider());
builder.Features.Add(new ViewComponentTagHelperPass());
builder.AddTargetExtension(new ViewComponentTagHelperTargetExtension());
}
#region Obsolete
[Obsolete("This method is obsolete and will be removed in a future version.")]
public static void Register(IRazorEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
EnsureDesignTime(builder);
InjectDirective.Register(builder);
ModelDirective.Register(builder);
FunctionsDirective.Register(builder);
InheritsDirective.Register(builder);
builder.Features.Add(new DefaultTagHelperDescriptorProvider());
// Register section directive with the 1.x compatible target extension.
builder.AddDirective(SectionDirective.Directive);
builder.Features.Add(new SectionDirectivePass());
builder.AddTargetExtension(new LegacySectionTargetExtension());
builder.AddTargetExtension(new TemplateTargetExtension()
{
TemplateTypeName = "global::Microsoft.AspNetCore.Mvc.Razor.HelperResult",
});
builder.Features.Add(new ModelExpressionPass());
builder.Features.Add(new MvcViewDocumentClassifierPass());
}
[Obsolete("This method is obsolete and will be removed in a future version.")]
public static void RegisterViewComponentTagHelpers(IRazorEngineBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
EnsureDesignTime(builder);
builder.Features.Add(new ViewComponentTagHelperDescriptorProvider());
builder.Features.Add(new ViewComponentTagHelperPass());
builder.AddTargetExtension(new ViewComponentTagHelperTargetExtension());
}
#pragma warning disable CS0618 // Type or member is obsolete
private static void EnsureDesignTime(IRazorEngineBuilder builder)
#pragma warning restore CS0618 // Type or member is obsolete
{
if (builder.DesignTime)
{
return;
}
throw new NotSupportedException(Resources.RuntimeCodeGenerationNotSupported);
}
#endregion
}

Просмотреть файл

@ -1,102 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class RazorExtensionsDiagnosticFactory
{
private const string DiagnosticPrefix = "RZ";
internal static readonly RazorDiagnosticDescriptor ViewComponent_CannotFindMethod =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}3900",
() => ViewComponentResources.ViewComponent_CannotFindMethod,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateViewComponent_CannotFindMethod(string tagHelperType)
{
var diagnostic = RazorDiagnostic.Create(
ViewComponent_CannotFindMethod,
new SourceSpan(SourceLocation.Undefined, contentLength: 0),
ViewComponentTypes.SyncMethodName,
ViewComponentTypes.AsyncMethodName,
tagHelperType);
return diagnostic;
}
internal static readonly RazorDiagnosticDescriptor ViewComponent_AmbiguousMethods =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}3901",
() => ViewComponentResources.ViewComponent_AmbiguousMethods,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateViewComponent_AmbiguousMethods(string tagHelperType)
{
var diagnostic = RazorDiagnostic.Create(
ViewComponent_AmbiguousMethods,
new SourceSpan(SourceLocation.Undefined, contentLength: 0),
tagHelperType,
ViewComponentTypes.SyncMethodName,
ViewComponentTypes.AsyncMethodName);
return diagnostic;
}
internal static readonly RazorDiagnosticDescriptor ViewComponent_AsyncMethod_ShouldReturnTask =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}3902",
() => ViewComponentResources.ViewComponent_AsyncMethod_ShouldReturnTask,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateViewComponent_AsyncMethod_ShouldReturnTask(string tagHelperType)
{
var diagnostic = RazorDiagnostic.Create(
ViewComponent_AsyncMethod_ShouldReturnTask,
new SourceSpan(SourceLocation.Undefined, contentLength: 0),
ViewComponentTypes.AsyncMethodName,
tagHelperType,
nameof(Task));
return diagnostic;
}
internal static readonly RazorDiagnosticDescriptor ViewComponent_SyncMethod_ShouldReturnValue =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}3903",
() => ViewComponentResources.ViewComponent_SyncMethod_ShouldReturnValue,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateViewComponent_SyncMethod_ShouldReturnValue(string tagHelperType)
{
var diagnostic = RazorDiagnostic.Create(
ViewComponent_SyncMethod_ShouldReturnValue,
new SourceSpan(SourceLocation.Undefined, contentLength: 0),
ViewComponentTypes.SyncMethodName,
tagHelperType);
return diagnostic;
}
internal static readonly RazorDiagnosticDescriptor ViewComponent_SyncMethod_CannotReturnTask =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}3904",
() => ViewComponentResources.ViewComponent_SyncMethod_CannotReturnTask,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateViewComponent_SyncMethod_CannotReturnTask(string tagHelperType)
{
var diagnostic = RazorDiagnostic.Create(
ViewComponent_SyncMethod_CannotReturnTask,
new SourceSpan(SourceLocation.Undefined, contentLength: 0),
ViewComponentTypes.SyncMethodName,
tagHelperType,
nameof(Task));
return diagnostic;
}
}

Просмотреть файл

@ -1,168 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ArgumentCannotBeNullOrEmpy" xml:space="preserve">
<value>Value cannot be null or empty.</value>
</data>
<data name="InjectDirective_Description" xml:space="preserve">
<value>Inject a service from the application's service container into a property.</value>
</data>
<data name="InjectDirective_MemberToken_Description" xml:space="preserve">
<value>The name of the property.</value>
</data>
<data name="InjectDirective_MemberToken_Name" xml:space="preserve">
<value>PropertyName</value>
</data>
<data name="InjectDirective_TypeToken_Description" xml:space="preserve">
<value>The type of the service to inject.</value>
</data>
<data name="InjectDirective_TypeToken_Name" xml:space="preserve">
<value>TypeName</value>
</data>
<data name="ModelDirective_Description" xml:space="preserve">
<value>Specify the view or page model for the page.</value>
</data>
<data name="ModelDirective_TypeToken_Description" xml:space="preserve">
<value>The model type.</value>
</data>
<data name="ModelDirective_TypeToken_Name" xml:space="preserve">
<value>TypeName</value>
</data>
<data name="MvcRazorCodeParser_CannotHaveModelAndInheritsKeyword" xml:space="preserve">
<value>The 'inherits' keyword is not allowed when a '{0}' keyword is used.</value>
</data>
<data name="MvcRazorCodeParser_InjectDirectivePropertyNameRequired" xml:space="preserve">
<value>A property name must be specified when using the '{0}' statement. Format for a '{0}' statement is '@{0} &lt;Type Name&gt; &lt;Property Name&gt;'.</value>
</data>
<data name="MvcRazorCodeParser_KeywordMustBeFollowedByTypeName" xml:space="preserve">
<value>The '{0}' keyword must be followed by a type name on the same line.</value>
</data>
<data name="MvcRazorCodeParser_OnlyOneModelStatementIsAllowed" xml:space="preserve">
<value>Only one '{0}' statement is allowed in a file.</value>
</data>
<data name="MvcRazorParser_InvalidPropertyType" xml:space="preserve">
<value>Invalid tag helper property '{0}.{1}'. Dictionary values must not be of type '{2}'.</value>
</data>
<data name="PageDirectiveCannotBeImported" xml:space="preserve">
<value>The '@{0}' directive specified in {1} file will not be imported. The directive must appear at the top of each Razor cshtml file.</value>
</data>
<data name="RuntimeCodeGenerationNotSupported" xml:space="preserve">
<value>Runtime code generation for Mvc 1.x is not supported.</value>
</data>
</root>

Просмотреть файл

@ -1,36 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class TagHelperDescriptorExtensions
{
/// <summary>
/// Indicates whether a <see cref="TagHelperDescriptor"/> represents a view component.
/// </summary>
/// <param name="tagHelper">The <see cref="TagHelperDescriptor"/> to check.</param>
/// <returns>Whether a <see cref="TagHelperDescriptor"/> represents a view component.</returns>
public static bool IsViewComponentKind(this TagHelperDescriptor tagHelper)
{
if (tagHelper == null)
{
throw new ArgumentNullException(nameof(tagHelper));
}
return string.Equals(ViewComponentTagHelperConventions.Kind, tagHelper.Kind, StringComparison.Ordinal);
}
public static string GetViewComponentName(this TagHelperDescriptor tagHelper)
{
if (tagHelper == null)
{
throw new ArgumentNullException(nameof(tagHelper));
}
tagHelper.Metadata.TryGetValue(ViewComponentTagHelperMetadata.Name, out var result);
return result;
}
}

Просмотреть файл

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ViewComponent_AmbiguousMethods" xml:space="preserve">
<value>View component '{0}' must have exactly one public method named '{1}' or '{2}'.</value>
</data>
<data name="ViewComponent_AsyncMethod_ShouldReturnTask" xml:space="preserve">
<value>Method '{0}' of view component '{1}' should be declared to return {2}&amp;lt;T&amp;gt;.</value>
</data>
<data name="ViewComponent_CannotFindMethod" xml:space="preserve">
<value>Could not find an '{0}' or '{1}' method for the view component '{2}'.</value>
</data>
<data name="ViewComponent_SyncMethod_CannotReturnTask" xml:space="preserve">
<value>Method '{0}' of view component '{1}' cannot return a {2}.</value>
</data>
<data name="ViewComponent_SyncMethod_ShouldReturnValue" xml:space="preserve">
<value>Method '{0}' of view component '{1}' should be declared to return a value.</value>
</data>
</root>

Просмотреть файл

@ -1,9 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class ViewComponentTagHelperConventions
{
public static readonly string Kind = "MVC.ViewComponent";
}

Просмотреть файл

@ -1,268 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class ViewComponentTagHelperDescriptorFactory
{
private readonly INamedTypeSymbol _viewComponentAttributeSymbol;
private readonly INamedTypeSymbol _genericTaskSymbol;
private readonly INamedTypeSymbol _taskSymbol;
private readonly INamedTypeSymbol _iDictionarySymbol;
private static readonly SymbolDisplayFormat FullNameTypeDisplayFormat =
SymbolDisplayFormat.FullyQualifiedFormat
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)
.WithMiscellaneousOptions(SymbolDisplayFormat.FullyQualifiedFormat.MiscellaneousOptions & (~SymbolDisplayMiscellaneousOptions.UseSpecialTypes));
private static readonly IReadOnlyDictionary<string, string> PrimitiveDisplayTypeNameLookups = new Dictionary<string, string>(StringComparer.Ordinal)
{
[typeof(byte).FullName] = "byte",
[typeof(sbyte).FullName] = "sbyte",
[typeof(int).FullName] = "int",
[typeof(uint).FullName] = "uint",
[typeof(short).FullName] = "short",
[typeof(ushort).FullName] = "ushort",
[typeof(long).FullName] = "long",
[typeof(ulong).FullName] = "ulong",
[typeof(float).FullName] = "float",
[typeof(double).FullName] = "double",
[typeof(char).FullName] = "char",
[typeof(bool).FullName] = "bool",
[typeof(object).FullName] = "object",
[typeof(string).FullName] = "string",
[typeof(decimal).FullName] = "decimal",
};
public ViewComponentTagHelperDescriptorFactory(Compilation compilation)
{
_viewComponentAttributeSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.ViewComponentAttribute);
_genericTaskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.GenericTask);
_taskSymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.Task);
_iDictionarySymbol = compilation.GetTypeByMetadataName(ViewComponentTypes.IDictionary);
}
public virtual TagHelperDescriptor CreateDescriptor(INamedTypeSymbol type)
{
var assemblyName = type.ContainingAssembly.Name;
var shortName = GetShortName(type);
var tagName = $"vc:{HtmlConventions.ToHtmlCase(shortName)}";
var typeName = $"__Generated__{shortName}ViewComponentTagHelper";
var displayName = shortName + "ViewComponentTagHelper";
var descriptorBuilder = TagHelperDescriptorBuilder.Create(ViewComponentTagHelperConventions.Kind, typeName, assemblyName);
descriptorBuilder.SetTypeName(typeName);
descriptorBuilder.DisplayName = displayName;
if (TryFindInvokeMethod(type, out var method, out var diagnostic))
{
var methodParameters = method.Parameters;
descriptorBuilder.TagMatchingRule(ruleBuilder =>
{
ruleBuilder.TagName = tagName;
AddRequiredAttributes(methodParameters, ruleBuilder);
});
AddBoundAttributes(methodParameters, displayName, descriptorBuilder);
}
else
{
descriptorBuilder.Diagnostics.Add(diagnostic);
}
descriptorBuilder.Metadata[ViewComponentTagHelperMetadata.Name] = shortName;
var descriptor = descriptorBuilder.Build();
return descriptor;
}
private bool TryFindInvokeMethod(INamedTypeSymbol type, out IMethodSymbol method, out RazorDiagnostic diagnostic)
{
var methods = type.GetMembers()
.OfType<IMethodSymbol>()
.Where(m =>
m.DeclaredAccessibility == Accessibility.Public &&
(string.Equals(m.Name, ViewComponentTypes.AsyncMethodName, StringComparison.Ordinal) ||
string.Equals(m.Name, ViewComponentTypes.SyncMethodName, StringComparison.Ordinal)))
.ToArray();
if (methods.Length == 0)
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_CannotFindMethod(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
else if (methods.Length > 1)
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_AmbiguousMethods(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
var selectedMethod = methods[0];
var returnType = selectedMethod.ReturnType as INamedTypeSymbol;
if (string.Equals(selectedMethod.Name, ViewComponentTypes.AsyncMethodName, StringComparison.Ordinal))
{
// Will invoke asynchronously. Method must not return Task or Task<T>.
if (SymbolEqualityComparer.Default.Equals(returnType, _taskSymbol))
{
// This is ok.
}
else if (returnType.IsGenericType && SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, _genericTaskSymbol))
{
// This is ok.
}
else
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_AsyncMethod_ShouldReturnTask(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
}
else
{
// Will invoke synchronously. Method must not return void, Task or Task<T>.
if (returnType.SpecialType == SpecialType.System_Void)
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_SyncMethod_ShouldReturnValue(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
else if (SymbolEqualityComparer.Default.Equals(returnType, _taskSymbol))
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_SyncMethod_CannotReturnTask(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
else if (returnType.IsGenericType && SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, _genericTaskSymbol))
{
diagnostic = RazorExtensionsDiagnosticFactory.CreateViewComponent_SyncMethod_CannotReturnTask(type.ToDisplayString(FullNameTypeDisplayFormat));
method = null;
return false;
}
}
method = selectedMethod;
diagnostic = null;
return true;
}
private void AddRequiredAttributes(ImmutableArray<IParameterSymbol> methodParameters, TagMatchingRuleDescriptorBuilder builder)
{
foreach (var parameter in methodParameters)
{
if (GetIndexerValueTypeName(parameter) == null)
{
// Set required attributes only for non-indexer attributes. Indexer attributes can't be required attributes
// because there are two ways of setting values for the attribute.
builder.Attribute(attributeBuilder =>
{
var lowerKebabName = HtmlConventions.ToHtmlCase(parameter.Name);
attributeBuilder.Name = lowerKebabName;
});
}
}
}
private void AddBoundAttributes(ImmutableArray<IParameterSymbol> methodParameters, string containingDisplayName, TagHelperDescriptorBuilder builder)
{
foreach (var parameter in methodParameters)
{
var lowerKebabName = HtmlConventions.ToHtmlCase(parameter.Name);
var typeName = parameter.Type.ToDisplayString(FullNameTypeDisplayFormat);
if (!PrimitiveDisplayTypeNameLookups.TryGetValue(typeName, out var simpleName))
{
simpleName = typeName;
}
builder.BindAttribute(attributeBuilder =>
{
attributeBuilder.Name = lowerKebabName;
attributeBuilder.TypeName = typeName;
attributeBuilder.DisplayName = $"{simpleName} {containingDisplayName}.{parameter.Name}";
attributeBuilder.SetPropertyName(parameter.Name);
if (parameter.Type.TypeKind == TypeKind.Enum)
{
attributeBuilder.IsEnum = true;
}
else
{
var dictionaryValueType = GetIndexerValueTypeName(parameter);
if (dictionaryValueType != null)
{
attributeBuilder.AsDictionary(lowerKebabName + "-", dictionaryValueType);
}
}
});
}
}
private string GetIndexerValueTypeName(IParameterSymbol parameter)
{
INamedTypeSymbol dictionaryType;
if (SymbolEqualityComparer.Default.Equals((parameter.Type as INamedTypeSymbol)?.ConstructedFrom, _iDictionarySymbol))
{
dictionaryType = (INamedTypeSymbol)parameter.Type;
}
else if (parameter.Type.AllInterfaces.Any(s => SymbolEqualityComparer.Default.Equals(s.ConstructedFrom, _iDictionarySymbol)))
{
dictionaryType = parameter.Type.AllInterfaces.First(s => SymbolEqualityComparer.Default.Equals(s.ConstructedFrom, _iDictionarySymbol));
}
else
{
dictionaryType = null;
}
if (dictionaryType == null || dictionaryType.TypeArguments[0].SpecialType != SpecialType.System_String)
{
return null;
}
var type = dictionaryType.TypeArguments[1];
var typeName = type.ToDisplayString(FullNameTypeDisplayFormat);
return typeName;
}
private string GetShortName(INamedTypeSymbol componentType)
{
var viewComponentAttribute = componentType.GetAttributes().Where(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _viewComponentAttributeSymbol)).FirstOrDefault();
var name = viewComponentAttribute
?.NamedArguments
.Where(namedArgument => string.Equals(namedArgument.Key, ViewComponentTypes.ViewComponent.Name, StringComparison.Ordinal))
.FirstOrDefault()
.Value
.Value as string;
if (!string.IsNullOrEmpty(name))
{
var separatorIndex = name.LastIndexOf('.');
if (separatorIndex >= 0)
{
return name.Substring(separatorIndex + 1);
}
else
{
return name;
}
}
// Get name by convention
if (componentType.Name.EndsWith(ViewComponentTypes.ViewComponentSuffix, StringComparison.OrdinalIgnoreCase))
{
return componentType.Name.Substring(0, componentType.Name.Length - ViewComponentTypes.ViewComponentSuffix.Length);
}
else
{
return componentType.Name;
}
}
}

Просмотреть файл

@ -1,71 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Razor;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public sealed class ViewComponentTagHelperDescriptorProvider : RazorEngineFeatureBase, ITagHelperDescriptorProvider
{
public int Order { get; set; }
public void Execute(TagHelperDescriptorProviderContext context)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var compilation = context.GetCompilation();
if (compilation == null)
{
// No compilation, nothing to do.
return;
}
var vcAttribute = compilation.GetTypeByMetadataName(ViewComponentTypes.ViewComponentAttribute);
var nonVCAttribute = compilation.GetTypeByMetadataName(ViewComponentTypes.NonViewComponentAttribute);
if (vcAttribute == null || vcAttribute.TypeKind == TypeKind.Error)
{
// Could not find attributes we care about in the compilation. Nothing to do.
return;
}
var types = new List<INamedTypeSymbol>();
var visitor = new ViewComponentTypeVisitor(vcAttribute, nonVCAttribute, types);
// We always visit the global namespace.
visitor.Visit(compilation.Assembly.GlobalNamespace);
foreach (var reference in compilation.References)
{
if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol assembly)
{
if (IsTagHelperAssembly(assembly))
{
visitor.Visit(assembly.GlobalNamespace);
}
}
}
var factory = new ViewComponentTagHelperDescriptorFactory(compilation);
for (var i = 0; i < types.Count; i++)
{
var descriptor = factory.CreateDescriptor(types[i]);
if (descriptor != null)
{
context.Results.Add(descriptor);
}
}
}
private bool IsTagHelperAssembly(IAssemblySymbol assembly)
{
return assembly.Name != null && !assembly.Name.StartsWith("System.", StringComparison.Ordinal);
}
}

Просмотреть файл

@ -1,58 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public sealed class ViewComponentTagHelperIntermediateNode : ExtensionIntermediateNode
{
public override IntermediateNodeCollection Children { get; } = IntermediateNodeCollection.ReadOnly;
public string ClassName { get; set; }
public TagHelperDescriptor TagHelper { get; set; }
public override void Accept(IntermediateNodeVisitor visitor)
{
if (visitor == null)
{
throw new ArgumentNullException(nameof(visitor));
}
AcceptExtensionNode<ViewComponentTagHelperIntermediateNode>(this, visitor);
}
public override void WriteNode(CodeTarget target, CodeRenderingContext context)
{
if (target == null)
{
throw new ArgumentNullException(nameof(target));
}
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
var extension = target.GetExtension<IViewComponentTagHelperTargetExtension>();
if (extension == null)
{
ReportMissingCodeTargetExtension<IViewComponentTagHelperTargetExtension>(context);
return;
}
extension.WriteViewComponentTagHelper(context, this);
}
public override void FormatNode(IntermediateNodeFormatter formatter)
{
formatter.WriteContent(ClassName);
formatter.WriteProperty(nameof(ClassName), ClassName);
formatter.WriteProperty(nameof(TagHelper), TagHelper?.DisplayName);
}
}

Просмотреть файл

@ -1,13 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class ViewComponentTagHelperMetadata
{
/// <summary>
/// The key in a <see cref="Microsoft.AspNetCore.Razor.Language.TagHelperDescriptor.Metadata"/> containing
/// the short name of a view component.
/// </summary>
public static readonly string Name = "MVC.ViewComponent.Name";
}

Просмотреть файл

@ -1,202 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class ViewComponentTagHelperPass : IntermediateNodePassBase, IRazorOptimizationPass
{
// Run after the default taghelper pass
public override int Order => IntermediateNodePassBase.DefaultFeatureOrder + 2000;
protected override void ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode)
{
var @namespace = documentNode.FindPrimaryNamespace();
var @class = documentNode.FindPrimaryClass();
if (@namespace == null || @class == null)
{
// Nothing to do, bail. We can't function without the standard structure.
return;
}
var context = new Context(@namespace, @class);
// For each VCTH *usage* we need to rewrite the tag helper node to use the tag helper runtime to construct
// and set properties on the the correct field, and using the name of the type we will generate.
var nodes = documentNode.FindDescendantNodes<TagHelperIntermediateNode>();
for (var i = 0; i < nodes.Count; i++)
{
var node = nodes[i];
foreach (var tagHelper in node.TagHelpers)
{
RewriteUsage(context, node, tagHelper);
}
}
// Then for each VCTH *definition* that we've seen we need to generate the class that implements
// ITagHelper and the field that will hold it.
foreach (var tagHelper in context.TagHelpers)
{
AddField(context, tagHelper);
AddTagHelperClass(context, tagHelper);
}
}
private void RewriteUsage(Context context, TagHelperIntermediateNode node, TagHelperDescriptor tagHelper)
{
if (!tagHelper.IsViewComponentKind())
{
return;
}
context.Add(tagHelper);
// Now we need to insert a create node using the default tag helper runtime. This is similar to
// code in DefaultTagHelperOptimizationPass.
//
// Find the body node.
var i = 0;
while (i < node.Children.Count && node.Children[i] is TagHelperBodyIntermediateNode)
{
i++;
}
while (i < node.Children.Count && node.Children[i] is DefaultTagHelperBodyIntermediateNode)
{
i++;
}
// Now find the last create node.
while (i < node.Children.Count && node.Children[i] is DefaultTagHelperCreateIntermediateNode)
{
i++;
}
// Now i has the right insertion point.
node.Children.Insert(i, new DefaultTagHelperCreateIntermediateNode()
{
FieldName = context.GetFieldName(tagHelper),
TagHelper = tagHelper,
TypeName = context.GetFullyQualifiedName(tagHelper),
});
// Now we need to rewrite any set property nodes to use the default runtime.
for (i = 0; i < node.Children.Count; i++)
{
if (node.Children[i] is TagHelperPropertyIntermediateNode propertyNode &&
propertyNode.TagHelper == tagHelper)
{
// This is a set property for this VCTH - we need to replace it with a node
// that will use our field and property name.
node.Children[i] = new DefaultTagHelperPropertyIntermediateNode(propertyNode)
{
FieldName = context.GetFieldName(tagHelper),
PropertyName = propertyNode.BoundAttribute.GetPropertyName(),
};
}
}
}
private void AddField(Context context, TagHelperDescriptor tagHelper)
{
// We need to insert a node for the field that will hold the tag helper. We've already generated a field name
// at this time and use it for all uses of the same tag helper type.
//
// We also want to preserve the ordering of the nodes for testability. So insert at the end of any existing
// field nodes.
var i = 0;
while (i < context.Class.Children.Count && context.Class.Children[i] is DefaultTagHelperRuntimeIntermediateNode)
{
i++;
}
while (i < context.Class.Children.Count && context.Class.Children[i] is FieldDeclarationIntermediateNode)
{
i++;
}
context.Class.Children.Insert(i, new FieldDeclarationIntermediateNode()
{
Annotations =
{
{ CommonAnnotations.DefaultTagHelperExtension.TagHelperField, bool.TrueString },
},
Modifiers =
{
"private",
},
FieldName = context.GetFieldName(tagHelper),
FieldType = "global::" + context.GetFullyQualifiedName(tagHelper),
});
}
private void AddTagHelperClass(Context context, TagHelperDescriptor tagHelper)
{
var node = new ViewComponentTagHelperIntermediateNode()
{
ClassName = context.GetClassName(tagHelper),
TagHelper = tagHelper
};
context.Class.Children.Add(node);
}
private struct Context
{
private readonly Dictionary<TagHelperDescriptor, (string className, string fullyQualifiedName, string fieldName)> _tagHelpers;
public Context(NamespaceDeclarationIntermediateNode @namespace, ClassDeclarationIntermediateNode @class)
{
Namespace = @namespace;
Class = @class;
_tagHelpers = new Dictionary<TagHelperDescriptor, (string, string, string)>();
}
public ClassDeclarationIntermediateNode Class { get; }
public NamespaceDeclarationIntermediateNode Namespace { get; }
public IEnumerable<TagHelperDescriptor> TagHelpers => _tagHelpers.Keys;
public bool Add(TagHelperDescriptor tagHelper)
{
if (_tagHelpers.ContainsKey(tagHelper))
{
return false;
}
var className = $"__Generated__{tagHelper.GetViewComponentName()}ViewComponentTagHelper";
var fullyQualifiedName = $"{Namespace.Content}.{Class.ClassName}.{className}";
var fieldName = GenerateFieldName(tagHelper);
_tagHelpers.Add(tagHelper, (className, fullyQualifiedName, fieldName));
return true;
}
public string GetClassName(TagHelperDescriptor taghelper)
{
return _tagHelpers[taghelper].className;
}
public string GetFullyQualifiedName(TagHelperDescriptor taghelper)
{
return _tagHelpers[taghelper].fullyQualifiedName;
}
public string GetFieldName(TagHelperDescriptor taghelper)
{
return _tagHelpers[taghelper].fieldName;
}
private static string GenerateFieldName(TagHelperDescriptor tagHelper)
{
return $"__{tagHelper.GetViewComponentName()}ViewComponentTagHelper";
}
}
}

Просмотреть файл

@ -1,182 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class ViewComponentTagHelperTargetExtension : IViewComponentTagHelperTargetExtension
{
private static readonly string[] PublicModifiers = new[] { "public" };
public string TagHelperTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelper";
public string ViewComponentHelperTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.IViewComponentHelper";
public string ViewComponentHelperVariableName { get; set; } = "_helper";
public string ViewComponentInvokeMethodName { get; set; } = "InvokeAsync";
public string HtmlAttributeNotBoundAttributeTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNotBoundAttribute";
public string ViewContextAttributeTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.ViewFeatures.ViewContextAttribute";
public string ViewContextTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.Rendering.ViewContext";
public string ViewContextPropertyName { get; set; } = "ViewContext";
public string HtmlTargetElementAttributeTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute";
public string TagHelperProcessMethodName { get; set; } = "ProcessAsync";
public string TagHelperContextTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext";
public string TagHelperContextVariableName { get; set; } = "context";
public string TagHelperOutputTypeName { get; set; } = "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput";
public string TagHelperOutputVariableName { get; set; } = "output";
public string TagHelperOutputTagNamePropertyName { get; set; } = "TagName";
public string TagHelperOutputContentPropertyName { get; set; } = "Content";
public string TagHelperContentSetMethodName { get; set; } = "SetHtmlContent";
public string TagHelperContentVariableName { get; set; } = "content";
public string IViewContextAwareTypeName { get; set; } = "global::Microsoft.AspNetCore.Mvc.ViewFeatures.IViewContextAware";
public string IViewContextAwareContextualizeMethodName { get; set; } = "Contextualize";
public void WriteViewComponentTagHelper(CodeRenderingContext context, ViewComponentTagHelperIntermediateNode node)
{
// Add target element.
WriteTargetElementString(context.CodeWriter, node.TagHelper);
// Initialize declaration.
using (context.CodeWriter.BuildClassDeclaration(
PublicModifiers,
node.ClassName,
TagHelperTypeName,
interfaces: null,
typeParameters: null))
{
// Add view component helper.
context.CodeWriter.WriteVariableDeclaration(
$"private readonly {ViewComponentHelperTypeName}",
ViewComponentHelperVariableName,
value: null);
// Add constructor.
WriteConstructorString(context.CodeWriter, node.ClassName);
// Add attributes.
WriteAttributeDeclarations(context.CodeWriter, node.TagHelper);
// Add process method.
WriteProcessMethodString(context.CodeWriter, node.TagHelper);
}
}
private void WriteConstructorString(CodeWriter writer, string className)
{
writer.Write("public ")
.Write(className)
.Write("(")
.Write($"{ViewComponentHelperTypeName} helper")
.WriteLine(")");
using (writer.BuildScope())
{
writer.WriteStartAssignment(ViewComponentHelperVariableName)
.Write("helper")
.WriteLine(";");
}
}
private void WriteAttributeDeclarations(CodeWriter writer, TagHelperDescriptor tagHelper)
{
writer.Write("[")
.Write(HtmlAttributeNotBoundAttributeTypeName)
.WriteParameterSeparator()
.Write(ViewContextAttributeTypeName)
.WriteLine("]");
writer.WriteAutoPropertyDeclaration(
PublicModifiers,
ViewContextTypeName,
ViewContextPropertyName);
foreach (var attribute in tagHelper.BoundAttributes)
{
writer.WriteAutoPropertyDeclaration(
PublicModifiers,
attribute.TypeName,
attribute.GetPropertyName());
if (attribute.IndexerTypeName != null)
{
writer.Write(" = ")
.WriteStartNewObject(attribute.TypeName)
.WriteEndMethodInvocation();
}
}
}
private void WriteProcessMethodString(CodeWriter writer, TagHelperDescriptor tagHelper)
{
using (writer.BuildMethodDeclaration(
$"public override async",
$"global::{typeof(Task).FullName}",
TagHelperProcessMethodName,
new Dictionary<string, string>()
{
{ TagHelperContextTypeName, TagHelperContextVariableName },
{ TagHelperOutputTypeName, TagHelperOutputVariableName }
}))
{
writer.WriteInstanceMethodInvocation(
$"({ViewComponentHelperVariableName} as {IViewContextAwareTypeName})?",
IViewContextAwareContextualizeMethodName,
new[] { ViewContextPropertyName });
var methodParameters = GetMethodParameters(tagHelper);
writer.Write("var ")
.WriteStartAssignment(TagHelperContentVariableName)
.WriteInstanceMethodInvocation($"await {ViewComponentHelperVariableName}", ViewComponentInvokeMethodName, methodParameters);
writer.WriteStartAssignment($"{TagHelperOutputVariableName}.{TagHelperOutputTagNamePropertyName}")
.WriteLine("null;");
writer.WriteInstanceMethodInvocation(
$"{TagHelperOutputVariableName}.{TagHelperOutputContentPropertyName}",
TagHelperContentSetMethodName,
new[] { TagHelperContentVariableName });
}
}
private string[] GetMethodParameters(TagHelperDescriptor tagHelper)
{
var propertyNames = tagHelper.BoundAttributes.Select(attribute => attribute.GetPropertyName());
var joinedPropertyNames = string.Join(", ", propertyNames);
var parametersString = $"new {{ { joinedPropertyNames } }}";
var viewComponentName = tagHelper.GetViewComponentName();
var methodParameters = new[] { $"\"{viewComponentName}\"", parametersString };
return methodParameters;
}
private void WriteTargetElementString(CodeWriter writer, TagHelperDescriptor tagHelper)
{
Debug.Assert(tagHelper.TagMatchingRules.Count == 1);
var rule = tagHelper.TagMatchingRules[0];
writer.Write("[")
.WriteStartMethodInvocation(HtmlTargetElementAttributeTypeName)
.WriteStringLiteral(rule.TagName)
.WriteLine(")]");
}
}

Просмотреть файл

@ -1,83 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using Microsoft.CodeAnalysis;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal class ViewComponentTypeVisitor : SymbolVisitor
{
private readonly INamedTypeSymbol _viewComponentAttribute;
private readonly INamedTypeSymbol _nonViewComponentAttribute;
private readonly List<INamedTypeSymbol> _results;
public ViewComponentTypeVisitor(
INamedTypeSymbol viewComponentAttribute,
INamedTypeSymbol nonViewComponentAttribute,
List<INamedTypeSymbol> results)
{
_viewComponentAttribute = viewComponentAttribute;
_nonViewComponentAttribute = nonViewComponentAttribute;
_results = results;
}
public override void VisitNamedType(INamedTypeSymbol symbol)
{
if (IsViewComponent(symbol))
{
_results.Add(symbol);
}
if (symbol.DeclaredAccessibility != Accessibility.Public)
{
return;
}
foreach (var member in symbol.GetTypeMembers())
{
Visit(member);
}
}
public override void VisitNamespace(INamespaceSymbol symbol)
{
foreach (var member in symbol.GetMembers())
{
Visit(member);
}
}
internal bool IsViewComponent(INamedTypeSymbol symbol)
{
if (symbol.DeclaredAccessibility != Accessibility.Public ||
symbol.IsAbstract ||
symbol.IsGenericType ||
AttributeIsDefined(symbol, _nonViewComponentAttribute))
{
return false;
}
return symbol.Name.EndsWith(ViewComponentTypes.ViewComponentSuffix, StringComparison.Ordinal) ||
AttributeIsDefined(symbol, _viewComponentAttribute);
}
private static bool AttributeIsDefined(INamedTypeSymbol type, INamedTypeSymbol queryAttribute)
{
if (type == null || queryAttribute == null)
{
return false;
}
foreach (var attribute in type.GetAttributes())
{
if (SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, queryAttribute))
{
return true;
}
}
return AttributeIsDefined(type.BaseType, queryAttribute);
}
}

Просмотреть файл

@ -1,34 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
internal static class ViewComponentTypes
{
public const string Assembly = "Microsoft.AspNetCore.Mvc.ViewFeatures";
public static readonly Version AssemblyVersion = new Version(1, 1, 0, 0);
public const string ViewComponentSuffix = "ViewComponent";
public const string ViewComponentAttribute = "Microsoft.AspNetCore.Mvc.ViewComponentAttribute";
public const string NonViewComponentAttribute = "Microsoft.AspNetCore.Mvc.NonViewComponentAttribute";
public const string GenericTask = "System.Threading.Tasks.Task`1";
public const string Task = "System.Threading.Tasks.Task";
public const string IDictionary = "System.Collections.Generic.IDictionary`2";
public const string AsyncMethodName = "InvokeAsync";
public const string SyncMethodName = "Invoke";
public static class ViewComponent
{
public const string Name = "Name";
}
}

Просмотреть файл

@ -1,226 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class InjectDirectiveTest
{
[Fact]
public void InjectDirectivePass_Execute_DefinesProperty()
{
// Arrange
var codeDocument = CreateDocument(@"
@inject PropertyType PropertyName
");
var engine = CreateEngine();
var pass = new InjectDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal(2, @class.Children.Count);
var node = Assert.IsType<InjectIntermediateNode>(@class.Children[1]);
Assert.Equal("PropertyType", node.TypeName);
Assert.Equal("PropertyName", node.MemberName);
}
[Fact]
public void InjectDirectivePass_Execute_DedupesPropertiesByName()
{
// Arrange
var codeDocument = CreateDocument(@"
@inject PropertyType PropertyName
@inject PropertyType2 PropertyName
");
var engine = CreateEngine();
var pass = new InjectDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal(2, @class.Children.Count);
var node = Assert.IsType<InjectIntermediateNode>(@class.Children[1]);
Assert.Equal("PropertyType2", node.TypeName);
Assert.Equal("PropertyName", node.MemberName);
}
[Fact]
public void InjectDirectivePass_Execute_ExpandsTModel_WithDynamic()
{
// Arrange
var codeDocument = CreateDocument(@"
@inject PropertyType<TModel> PropertyName
");
var engine = CreateEngine();
var pass = new InjectDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal(2, @class.Children.Count);
var node = Assert.IsType<InjectIntermediateNode>(@class.Children[1]);
Assert.Equal("PropertyType<dynamic>", node.TypeName);
Assert.Equal("PropertyName", node.MemberName);
}
[Fact]
public void InjectDirectivePass_Execute_ExpandsTModel_WithModelTypeFirst()
{
// Arrange
var codeDocument = CreateDocument(@"
@model ModelType
@inject PropertyType<TModel> PropertyName
");
var engine = CreateEngine();
var pass = new InjectDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal(2, @class.Children.Count);
var node = Assert.IsType<InjectIntermediateNode>(@class.Children[1]);
Assert.Equal("PropertyType<ModelType>", node.TypeName);
Assert.Equal("PropertyName", node.MemberName);
}
[Fact]
public void InjectDirectivePass_Execute_ExpandsTModel_WithModelType()
{
// Arrange
var codeDocument = CreateDocument(@"
@inject PropertyType<TModel> PropertyName
@model ModelType
");
var engine = CreateEngine();
var pass = new InjectDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal(2, @class.Children.Count);
var node = Assert.IsType<InjectIntermediateNode>(@class.Children[1]);
Assert.Equal("PropertyType<ModelType>", node.TypeName);
Assert.Equal("PropertyName", node.MemberName);
}
private RazorCodeDocument CreateDocument(string content)
{
var source = RazorSourceDocument.Create(content, "test.cshtml");
return RazorCodeDocument.Create(source);
}
private ClassDeclarationIntermediateNode FindClassNode(IntermediateNode node)
{
var visitor = new ClassNodeVisitor();
visitor.Visit(node);
return visitor.Node;
}
private RazorEngine CreateEngine()
{
var configuration = RazorConfiguration.Create(RazorLanguageVersion.Version_1_1, "test", Array.Empty<RazorExtension>());
return RazorProjectEngine.Create(configuration, RazorProjectFileSystem.Empty, b =>
{
// Notice we're not registering the InjectDirective.Pass here so we can run it on demand.
b.AddDirective(InjectDirective.Directive);
b.AddDirective(ModelDirective.Directive);
}).Engine;
}
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();
}
private string GetCSharpContent(IntermediateNode node)
{
var builder = new StringBuilder();
for (var i = 0; i < node.Children.Count; i++)
{
var child = node.Children[i] as IntermediateToken;
if (child.Kind == TokenKind.CSharp)
{
builder.Append(child.Content);
}
}
return builder.ToString();
}
private class ClassNodeVisitor : IntermediateNodeWalker
{
public ClassDeclarationIntermediateNode Node { get; set; }
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
{
Node = node;
}
}
}

Просмотреть файл

@ -1,69 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class InjectTargetExtensionTest
{
[Fact]
public void InjectDirectiveTargetExtension_WritesProperty()
{
// Arrange
var context = TestCodeRenderingContext.CreateRuntime();
var target = new InjectTargetExtension();
var node = new InjectIntermediateNode()
{
TypeName = "PropertyType",
MemberName = "PropertyName",
};
// Act
target.WriteInjectProperty(context, node);
// Assert
Assert.Equal(
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
"public PropertyType PropertyName { get; private set; }" + Environment.NewLine,
context.CodeWriter.GenerateCode());
}
[Fact]
public void InjectDirectiveTargetExtension_WritesPropertyWithLinePragma_WhenSourceIsSet()
{
// Arrange
var context = TestCodeRenderingContext.CreateRuntime();
var target = new InjectTargetExtension();
var node = new InjectIntermediateNode()
{
TypeName = "PropertyType<ModelType>",
MemberName = "PropertyName",
Source = new SourceSpan(
filePath: "test-path",
absoluteIndex: 0,
lineIndex: 1,
characterIndex: 1,
length: 10)
};
// Act
target.WriteInjectProperty(context, node);
// Assert
Assert.Equal(Environment.NewLine +
"#nullable restore" + Environment.NewLine +
"#line 2 \"test-path\"" + Environment.NewLine +
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
"public PropertyType<ModelType> PropertyName { get; private set; }" + Environment.NewLine + Environment.NewLine +
"#line default" + Environment.NewLine +
"#line hidden" + Environment.NewLine +
"#nullable disable" + Environment.NewLine,
context.CodeWriter.GenerateCode());
}
}

Просмотреть файл

@ -1,371 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.IntegrationTests;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.CodeAnalysis.CSharp;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X.IntegrationTests;
public class CodeGenerationIntegrationTest : IntegrationTestBase
{
private static readonly CSharpCompilation DefaultBaseCompilation = MvcShim.BaseCompilation.WithAssemblyName("AppCode");
public CodeGenerationIntegrationTest()
: base(generateBaselines: null, projectDirectoryHint: "Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X")
{
Configuration = RazorConfiguration.Create(
RazorLanguageVersion.Version_1_1,
"MVC-1.1",
new[] { new AssemblyExtension("MVC-1.1", typeof(ExtensionInitializer).Assembly) });
}
protected override CSharpCompilation BaseCompilation => DefaultBaseCompilation;
protected override RazorConfiguration Configuration { get; }
protected override CSharpParseOptions CSharpParseOptions => base.CSharpParseOptions.WithLanguageVersion(LanguageVersion.CSharp8);
[Fact]
public void InvalidNamespaceAtEOF_DesignTime()
{
// Arrange
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToCSharp(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
var diagnotics = compiled.CodeDocument.GetCSharpDocument().Diagnostics;
Assert.Equal("RZ1007", Assert.Single(diagnotics).Id);
}
[Fact]
public void IncompleteDirectives_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
public class MyService<TModel>
{
public string Html { get; set; }
}");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToCSharp(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
// We expect this test to generate a bunch of errors.
Assert.True(compiled.CodeDocument.GetCSharpDocument().Diagnostics.Count > 0);
}
[Fact]
public void InheritsViewModel_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Razor;
public class MyBasePageForViews<TModel> : RazorPage
{
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
public class MyModel
{
}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void InheritsWithViewImports_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Razor;
public class MyBasePageForViews<TModel> : RazorPage
{
public override Task ExecuteAsync()
{
throw new System.NotImplementedException();
}
}
public class MyModel
{
}");
AddProjectItemFromText(@"@inherits MyBasePageForViews<TModel>");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void Basic_DesignTime()
{
// Arrange
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void Sections_DesignTime()
{
// Arrange
AddCSharpSyntaxTree($@"
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class InputTestTagHelper : {typeof(TagHelper).FullName}
{{
public ModelExpression For {{ get; set; }}
}}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void _ViewImports_DesignTime()
{
// Arrange
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void Inject_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
public class MyApp
{
public string MyProperty { get; set; }
}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void InjectWithModel_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
public class MyModel
{
}
public class MyService<TModel>
{
public string Html { get; set; }
}
public class MyApp
{
public string MyProperty { get; set; }
}");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void InjectWithSemicolon_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
public class MyModel
{
}
public class MyApp
{
public string MyProperty { get; set; }
}
public class MyService<TModel>
{
public string Html { get; set; }
}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void Model_DesignTime()
{
// Arrange
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void MultipleModels_DesignTime()
{
// Arrange
AddCSharpSyntaxTree(@"
public class ThisShouldBeGenerated
{
}");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToCSharp(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
var diagnotics = compiled.CodeDocument.GetCSharpDocument().Diagnostics;
Assert.Equal("RZ2001", Assert.Single(diagnotics).Id);
}
[Fact]
public void ModelExpressionTagHelper_DesignTime()
{
// Arrange
AddCSharpSyntaxTree($@"
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class InputTestTagHelper : {typeof(TagHelper).FullName}
{{
public ModelExpression For {{ get; set; }}
}}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
[Fact]
public void ViewComponentTagHelper_DesignTime()
{
// Arrange
AddCSharpSyntaxTree($@"
public class TestViewComponent
{{
public string Invoke(string firstName)
{{
return firstName;
}}
}}
[{typeof(HtmlTargetElementAttribute).FullName}]
public class AllTagHelper : {typeof(TagHelper).FullName}
{{
public string Bar {{ get; set; }}
}}
");
var projectItem = CreateProjectItemFromFile();
// Act
var compiled = CompileToAssembly(projectItem, designTime: true);
// Assert
AssertDocumentNodeMatchesBaseline(compiled.CodeDocument.GetDocumentIntermediateNode());
AssertCSharpDocumentMatchesBaseline(compiled.CodeDocument.GetCSharpDocument());
AssertSourceMappingsMatchBaseline(compiled.CodeDocument);
}
}

Просмотреть файл

@ -1,45 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Xunit;
namespace Microsoft.AspNetCore.Razor.Language.Extensions;
public class LegacySectionTargetExtensionTest
{
[Fact]
public void WriteSection_WritesSectionCode_DesignTime()
{
// Arrange
var node = new SectionIntermediateNode()
{
Children =
{
new CSharpExpressionIntermediateNode(),
},
SectionName = "MySection"
};
var extension = new LegacySectionTargetExtension()
{
SectionMethodName = "CreateSection"
};
var context = TestCodeRenderingContext.CreateDesignTime();
// Act
extension.WriteSection(context, node);
// Assert
var expected = @"CreateSection(""MySection"", async(__razor_section_writer) => {
Render Children
}
);
";
var output = context.CodeWriter.GenerateCode();
Assert.Equal(expected, output, ignoreLineEndingDifferences: true);
}
}

Просмотреть файл

@ -1,39 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);$(DefaultNetFxTargetFramework)</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**</DefaultItemExcludes>
<!-- Work around https://github.com/microsoft/msbuild/issues/4740 -->
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="TestFiles\**" />
<None Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X" />
<Reference Include="Microsoft.CodeAnalysis.Razor" />
<Reference Include="Microsoft.CodeAnalysis.CSharp" />
<Reference Include="Microsoft.Extensions.DependencyModel" />
<ProjectReference Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common\Microsoft.AspNetCore.Razor.Test.Common.csproj" />
<ProjectReference Include="..\..\test\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X.csproj" />
</ItemGroup>
<ItemGroup>
<MvcShim Condition="$(TargetFramework) != ''" Include="$(ArtifactsBinDir)\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X\$(Configuration)\$(TargetFramework)\Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X.deps.json" />
</ItemGroup>
<Target Name="CopyDepsFromShims_Build" AfterTargets="Build">
<Copy SourceFiles="@(MvcShim)" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="CopyDepsFromShims_Publish" AfterTargets="Publish">
<Copy SourceFiles="@(MvcShim)" DestinationFolder="$(PublishDir)" Condition="Exists($(PublishDir))" />
</Target>
</Project>

Просмотреть файл

@ -1,344 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.IO;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Extensions;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class ModelDirectiveTest : RazorProjectEngineTestBase
{
protected override RazorLanguageVersion Version => RazorLanguageVersion.Version_1_1;
[Fact]
public void ModelDirective_GetModelType_GetsTypeFromFirstWellFormedDirective()
{
// Arrange
var codeDocument = CreateDocument(@"
@model Type1
@model Type2
@model
");
var engine = CreateRuntimeEngine();
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
var result = ModelDirective.GetModelType(irDocument);
// Assert
Assert.Equal("Type1", result);
}
[Fact]
public void ModelDirective_GetModelType_DefaultsToDynamic()
{
// Arrange
var codeDocument = CreateDocument(@" ");
var engine = CreateRuntimeEngine();
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
var result = ModelDirective.GetModelType(irDocument);
// Assert
Assert.Equal("dynamic", result);
}
[Fact]
public void ModelDirectivePass_Execute_ReplacesTModelInBaseType()
{
// Arrange
var codeDocument = CreateDocument(@"
@inherits BaseType<TModel>
@model Type1
");
var engine = CreateRuntimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType<Type1>", @class.BaseType);
}
[Fact]
public void ModelDirectivePass_Execute_ReplacesTModelInBaseType_DifferentOrdering()
{
// Arrange
var codeDocument = CreateDocument(@"
@model Type1
@inherits BaseType<TModel>
@model Type2
");
var engine = CreateRuntimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType<Type1>", @class.BaseType);
}
[Fact]
public void ModelDirectivePass_Execute_NoOpWithoutTModel()
{
// Arrange
var codeDocument = CreateDocument(@"
@inherits BaseType
@model Type1
");
var engine = CreateRuntimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType", @class.BaseType);
}
[Fact]
public void ModelDirectivePass_Execute_ReplacesTModelInBaseType_DefaultDynamic()
{
// Arrange
var codeDocument = CreateDocument(@"
@inherits BaseType<TModel>
");
var engine = CreateRuntimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType<dynamic>", @class.BaseType);
}
[Fact]
public void ModelDirectivePass_DesignTime_AddsTModelUsingDirective()
{
// Arrange
var codeDocument = CreateDocument(@"
@inherits BaseType<TModel>
");
var engine = CreateDesignTimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType<dynamic>", @class.BaseType);
var @namespace = FindNamespaceNode(irDocument);
var usingNode = Assert.IsType<UsingDirectiveIntermediateNode>(@namespace.Children[0]);
Assert.Equal($"TModel = global::{typeof(object).FullName}", usingNode.Content);
}
[Fact]
public void ModelDirectivePass_DesignTime_WithModel_AddsTModelUsingDirective()
{
// Arrange
var codeDocument = CreateDocument(@"
@inherits BaseType<TModel>
@model SomeType
");
var engine = CreateDesignTimeEngine();
var pass = new ModelDirective.Pass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var @class = FindClassNode(irDocument);
Assert.NotNull(@class);
Assert.Equal("BaseType<SomeType>", @class.BaseType);
var @namespace = FindNamespaceNode(irDocument);
var usingNode = Assert.IsType<UsingDirectiveIntermediateNode>(@namespace.Children[0]);
Assert.Equal($"TModel = global::System.Object", usingNode.Content);
}
private RazorCodeDocument CreateDocument(string content)
{
var source = RazorSourceDocument.Create(content, "test.cshtml");
return RazorCodeDocument.Create(source);
}
private ClassDeclarationIntermediateNode FindClassNode(IntermediateNode node)
{
var visitor = new ClassNodeVisitor();
visitor.Visit(node);
return visitor.Node;
}
private NamespaceDeclarationIntermediateNode FindNamespaceNode(IntermediateNode node)
{
var visitor = new NamespaceNodeVisitor();
visitor.Visit(node);
return visitor.Node;
}
private RazorEngine CreateRuntimeEngine()
{
return CreateEngineCore();
}
private RazorEngine CreateDesignTimeEngine()
{
return CreateEngineCore(designTime: true);
}
private RazorEngine CreateEngineCore(bool designTime = false)
{
return CreateProjectEngine(b =>
{
// Notice we're not registering the ModelDirective.Pass here so we can run it on demand.
b.AddDirective(ModelDirective.Directive);
// There's some special interaction with the inherits directive
InheritsDirective.Register(b);
b.Features.Add(new DesignTimeOptionsFeature(designTime));
}).Engine;
}
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;
}
}
// InheritsDirectivePass needs to run before ModelDirective.
var pass = new InheritsDirectivePass()
{
Engine = engine
};
pass.Execute(codeDocument, codeDocument.GetDocumentIntermediateNode());
return codeDocument.GetDocumentIntermediateNode();
}
private string GetCSharpContent(IntermediateNode node)
{
var builder = new StringBuilder();
for (var i = 0; i < node.Children.Count; i++)
{
var child = node.Children[i] as IntermediateToken;
if (child.Kind == TokenKind.CSharp)
{
builder.Append(child.Content);
}
}
return builder.ToString();
}
private class ClassNodeVisitor : IntermediateNodeWalker
{
public ClassDeclarationIntermediateNode Node { get; set; }
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
{
Node = node;
}
}
private class NamespaceNodeVisitor : IntermediateNodeWalker
{
public NamespaceDeclarationIntermediateNode Node { get; set; }
public override void VisitNamespaceDeclaration(NamespaceDeclarationIntermediateNode node)
{
Node = node;
}
}
private class DesignTimeOptionsFeature : IConfigureRazorParserOptionsFeature, IConfigureRazorCodeGenerationOptionsFeature
{
private readonly bool _designTime;
public DesignTimeOptionsFeature(bool designTime)
{
_designTime = designTime;
}
public int Order { get; }
public RazorEngine Engine { get; set; }
public void Configure(RazorParserOptionsBuilder options)
{
options.SetDesignTime(_designTime);
}
public void Configure(RazorCodeGenerationOptionsBuilder options)
{
options.SetDesignTime(_designTime);
}
}
}

Просмотреть файл

@ -1,207 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Microsoft.AspNetCore.Razor.Language.Legacy;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class ModelExpressionPassTest
{
[Fact]
public void ModelExpressionPass_NonModelExpressionProperty_Ignored()
{
// Arrange
var codeDocument = CreateDocument(@"
@addTagHelper TestTagHelper, TestAssembly
<p foo=""17"">");
var tagHelpers = new[]
{
TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly")
.BoundAttributeDescriptor(attribute =>
attribute
.Name("Foo")
.TypeName("System.Int32"))
.TagMatchingRuleDescriptor(rule =>
rule.RequireTagName("p"))
.Build()
};
var engine = CreateEngine(tagHelpers);
var pass = new ModelExpressionPass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var tagHelper = FindTagHelperNode(irDocument);
var setProperty = tagHelper.Children.OfType<TagHelperPropertyIntermediateNode>().Single();
var token = Assert.IsAssignableFrom<IntermediateToken>(Assert.Single(setProperty.Children));
Assert.True(token.IsCSharp);
Assert.Equal("17", token.Content);
}
[Fact]
public void ModelExpressionPass_ModelExpressionProperty_SimpleExpression()
{
// Arrange
// Using \r\n here because we verify line mappings
var codeDocument = CreateDocument(
"@addTagHelper TestTagHelper, TestAssembly\r\n<p foo=\"Bar\">");
var tagHelpers = new[]
{
TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly")
.BoundAttributeDescriptor(attribute =>
attribute
.Name("Foo")
.TypeName("Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression"))
.TagMatchingRuleDescriptor(rule =>
rule.RequireTagName("p"))
.Build()
};
var engine = CreateEngine(tagHelpers);
var pass = new ModelExpressionPass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var tagHelper = FindTagHelperNode(irDocument);
var setProperty = tagHelper.Children.OfType<TagHelperPropertyIntermediateNode>().Single();
var expression = Assert.IsType<CSharpExpressionIntermediateNode>(Assert.Single(setProperty.Children));
Assert.Equal("ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Bar)", GetCSharpContent(expression));
var originalNode = Assert.IsAssignableFrom<IntermediateToken>(expression.Children[2]);
Assert.Equal(TokenKind.CSharp, originalNode.Kind);
Assert.Equal("Bar", originalNode.Content);
Assert.Equal(new SourceSpan("test.cshtml", 51, 1, 8, 3), originalNode.Source.Value);
}
[Fact]
public void ModelExpressionPass_ModelExpressionProperty_ComplexExpression()
{
// Arrange
// Using \r\n here because we verify line mappings
var codeDocument = CreateDocument(
"@addTagHelper TestTagHelper, TestAssembly\r\n<p foo=\"@Bar\">");
var tagHelpers = new[]
{
TagHelperDescriptorBuilder.Create("TestTagHelper", "TestAssembly")
.BoundAttributeDescriptor(attribute =>
attribute
.Name("Foo")
.TypeName("Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression"))
.TagMatchingRuleDescriptor(rule =>
rule.RequireTagName("p"))
.Build()
};
var engine = CreateEngine(tagHelpers);
var pass = new ModelExpressionPass()
{
Engine = engine,
};
var irDocument = CreateIRDocument(engine, codeDocument);
// Act
pass.Execute(codeDocument, irDocument);
// Assert
var tagHelper = FindTagHelperNode(irDocument);
var setProperty = tagHelper.Children.OfType<TagHelperPropertyIntermediateNode>().Single();
var expression = Assert.IsType<CSharpExpressionIntermediateNode>(Assert.Single(setProperty.Children));
Assert.Equal("ModelExpressionProvider.CreateModelExpression(ViewData, __model => Bar)", GetCSharpContent(expression));
var originalNode = Assert.IsAssignableFrom<IntermediateToken>(expression.Children[1]);
Assert.Equal(TokenKind.CSharp, originalNode.Kind);
Assert.Equal("Bar", originalNode.Content);
Assert.Equal(new SourceSpan("test.cshtml", 52, 1, 9, 3), originalNode.Source.Value);
}
private RazorCodeDocument CreateDocument(string content)
{
var source = RazorSourceDocument.Create(content, "test.cshtml");
return RazorCodeDocument.Create(source);
}
private RazorEngine CreateEngine(params TagHelperDescriptor[] tagHelpers)
{
return RazorProjectEngine.Create(b =>
{
b.Features.Add(new TestTagHelperFeature(tagHelpers));
}).Engine;
}
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 IRazorDirectiveClassifierPhase)
{
break;
}
}
return codeDocument.GetDocumentIntermediateNode();
}
private TagHelperIntermediateNode FindTagHelperNode(IntermediateNode node)
{
var visitor = new TagHelperNodeVisitor();
visitor.Visit(node);
return visitor.Node;
}
private string GetCSharpContent(IntermediateNode node)
{
var builder = new StringBuilder();
for (var i = 0; i < node.Children.Count; i++)
{
var child = node.Children[i] as IntermediateToken;
if (child.Kind == TokenKind.CSharp)
{
builder.Append(child.Content);
}
}
return builder.ToString();
}
private class TagHelperNodeVisitor : IntermediateNodeWalker
{
public TagHelperIntermediateNode Node { get; set; }
public override void VisitTagHelper(TagHelperIntermediateNode node)
{
Node = node;
}
}
}

Просмотреть файл

@ -1,75 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections.Generic;
using Microsoft.AspNetCore.Razor.Language;
using Moq;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class MvcImportProjectFeatureTest
{
[Fact]
public void AddDefaultDirectivesImport_AddsSingleDynamicImport()
{
// Arrange
var imports = new List<RazorProjectItem>();
// Act
MvcImportProjectFeature.AddDefaultDirectivesImport(imports);
// Assert
var import = Assert.Single(imports);
Assert.Null(import.FilePath);
}
[Fact]
public void AddHierarchicalImports_AddsViewImportSourceDocumentsOnDisk()
{
// Arrange
var imports = new List<RazorProjectItem>();
var projectItem = new TestRazorProjectItem("/Contact/Index.cshtml");
var testFileSystem = new TestRazorProjectFileSystem(new[]
{
new TestRazorProjectItem("/Index.cshtml"),
new TestRazorProjectItem("/_ViewImports.cshtml"),
new TestRazorProjectItem("/Contact/_ViewImports.cshtml"),
projectItem,
});
var mvcImportFeature = new MvcImportProjectFeature()
{
ProjectEngine = Mock.Of<RazorProjectEngine>(projectEngine => projectEngine.FileSystem == testFileSystem)
};
// Act
mvcImportFeature.AddHierarchicalImports(projectItem, imports);
// Assert
Assert.Collection(imports,
import => Assert.Equal("/_ViewImports.cshtml", import.FilePath),
import => Assert.Equal("/Contact/_ViewImports.cshtml", import.FilePath));
}
[Fact]
public void AddHierarchicalImports_AddsViewImportSourceDocumentsNotOnDisk()
{
// Arrange
var imports = new List<RazorProjectItem>();
var projectItem = new TestRazorProjectItem("/Pages/Contact/Index.cshtml");
var testFileSystem = new TestRazorProjectFileSystem(new[] { projectItem });
var mvcImportFeature = new MvcImportProjectFeature()
{
ProjectEngine = Mock.Of<RazorProjectEngine>(projectEngine => projectEngine.FileSystem == testFileSystem)
};
// Act
mvcImportFeature.AddHierarchicalImports(projectItem, imports);
// Assert
Assert.Collection(imports,
import => Assert.Equal("/_ViewImports.cshtml", import.FilePath),
import => Assert.Equal("/Pages/_ViewImports.cshtml", import.FilePath),
import => Assert.Equal("/Pages/Contact/_ViewImports.cshtml", import.FilePath));
}
}

Просмотреть файл

@ -1,44 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
using System.Reflection;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions;
internal static class MvcShim
{
public static readonly string AssemblyName = "Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X";
private static Assembly _assembly;
private static CSharpCompilation _baseCompilation;
public static Assembly Assembly
{
get
{
if (_assembly == null)
{
var filePath = Path.Combine(Directory.GetCurrentDirectory(), AssemblyName + ".dll");
_assembly = Assembly.LoadFrom(filePath);
}
return _assembly;
}
}
public static CSharpCompilation BaseCompilation
{
get
{
if (_baseCompilation == null)
{
_baseCompilation = TestCompilation.Create(Assembly);
}
return _baseCompilation;
}
}
}

Просмотреть файл

@ -1,263 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language;
using Microsoft.AspNetCore.Razor.Language.Intermediate;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class MvcViewDocumentClassifierPassTest : RazorProjectEngineTestBase
{
protected override RazorLanguageVersion Version => RazorLanguageVersion.Version_1_1;
[Fact]
public void MvcViewDocumentClassifierPass_SetsDocumentKind()
{
// Arrange
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.cshtml"));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
// Assert
Assert.Equal("mvc.1.0.view", irDocument.DocumentKind);
}
[Fact]
public void MvcViewDocumentClassifierPass_NoOpsIfDocumentKindIsAlreadySet()
{
// Arrange
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.cshtml"));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
irDocument.DocumentKind = "some-value";
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
// Assert
Assert.Equal("some-value", irDocument.DocumentKind);
}
[Fact]
public void MvcViewDocumentClassifierPass_SetsNamespace()
{
// Arrange
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.cshtml"));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("AspNetCore", visitor.Namespace.Content);
}
[Fact]
public void MvcViewDocumentClassifierPass_SetsClass()
{
// Arrange
var properties = new RazorSourceDocumentProperties(filePath: "ignored", relativePath: "Test.cshtml");
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>", visitor.Class.BaseType);
Assert.Equal(new[] { "public" }, visitor.Class.Modifiers);
Assert.Equal("Test", visitor.Class.ClassName);
}
[Fact]
public void MvcViewDocumentClassifierPass_NullFilePath_SetsClass()
{
// Arrange
var properties = new RazorSourceDocumentProperties(filePath: null, relativePath: null);
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<TModel>", visitor.Class.BaseType);
Assert.Equal(new[] { "public" }, visitor.Class.Modifiers);
Assert.Equal("AspNetCore_d9f877a857a7e9928eac04d09a59f25967624155", visitor.Class.ClassName);
}
[Theory]
[InlineData("/Views/Home/Index.cshtml", "_Views_Home_Index")]
[InlineData("/Areas/MyArea/Views/Home/About.cshtml", "_Areas_MyArea_Views_Home_About")]
public void MvcViewDocumentClassifierPass_UsesRelativePathToGenerateTypeName(string relativePath, string expected)
{
// Arrange
var properties = new RazorSourceDocumentProperties(filePath: "ignored", relativePath: relativePath);
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal(expected, visitor.Class.ClassName);
}
[Fact]
public void MvcViewDocumentClassifierPass_UsesAbsolutePath_IfRelativePathIsNotSet()
{
// Arrange
var properties = new RazorSourceDocumentProperties(filePath: @"x::\application\Views\Home\Index.cshtml", relativePath: null);
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", properties));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("x___application_Views_Home_Index", visitor.Class.ClassName);
}
[Fact]
public void MvcViewDocumentClassifierPass_SanitizesClassName()
{
// Arrange
var properties = new RazorSourceDocumentProperties(filePath: @"x:\Test.cshtml", relativePath: "path.with+invalid-chars");
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("@page", properties));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("path_with_invalid_chars", visitor.Class.ClassName);
}
[Fact]
public void MvcViewDocumentClassifierPass_SetsUpExecuteAsyncMethod()
{
// Arrange
var codeDocument = RazorCodeDocument.Create(RazorSourceDocument.Create("some-content", "Test.cshtml"));
var projectEngine = CreateProjectEngine();
var irDocument = CreateIRDocument(projectEngine, codeDocument);
var pass = new MvcViewDocumentClassifierPass
{
Engine = projectEngine.Engine
};
// Act
pass.Execute(codeDocument, irDocument);
var visitor = new Visitor();
visitor.Visit(irDocument);
// Assert
Assert.Equal("ExecuteAsync", visitor.Method.MethodName);
Assert.Equal("global::System.Threading.Tasks.Task", visitor.Method.ReturnType);
Assert.Equal(new[] { "public", "async", "override" }, visitor.Method.Modifiers);
}
private static DocumentIntermediateNode CreateIRDocument(RazorProjectEngine engine, RazorCodeDocument codeDocument)
{
for (var i = 0; i < engine.Phases.Count; i++)
{
var phase = engine.Phases[i];
phase.Execute(codeDocument);
if (phase is IRazorIntermediateNodeLoweringPhase)
{
break;
}
}
return codeDocument.GetDocumentIntermediateNode();
}
private class Visitor : IntermediateNodeWalker
{
public NamespaceDeclarationIntermediateNode Namespace { get; private set; }
public ClassDeclarationIntermediateNode Class { get; private set; }
public MethodDeclarationIntermediateNode Method { get; private set; }
public override void VisitMethodDeclaration(MethodDeclarationIntermediateNode node)
{
Method = node;
}
public override void VisitNamespaceDeclaration(NamespaceDeclarationIntermediateNode node)
{
Namespace = node;
base.VisitNamespaceDeclaration(node);
}
public override void VisitClassDeclaration(ClassDeclarationIntermediateNode node)
{
Class = node;
base.VisitClassDeclaration(node);
}
}
}

Просмотреть файл

@ -1,6 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

Просмотреть файл

@ -1,53 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Text;
using Microsoft.AspNetCore.Razor.Language;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public static class SourceMappingsSerializer
{
public static string Serialize(RazorCSharpDocument csharpDocument, RazorSourceDocument sourceDocument)
{
var builder = new StringBuilder();
var sourceFilePath = sourceDocument.FilePath;
var charBuffer = new char[sourceDocument.Length];
sourceDocument.CopyTo(0, charBuffer, 0, sourceDocument.Length);
var sourceContent = new string(charBuffer);
for (var i = 0; i < csharpDocument.SourceMappings.Count; i++)
{
var sourceMapping = csharpDocument.SourceMappings[i];
if (!string.Equals(sourceMapping.OriginalSpan.FilePath, sourceFilePath, StringComparison.Ordinal))
{
continue;
}
builder.Append("Source Location: ");
AppendMappingLocation(builder, sourceMapping.OriginalSpan, sourceContent);
builder.Append("Generated Location: ");
AppendMappingLocation(builder, sourceMapping.GeneratedSpan, csharpDocument.GeneratedCode);
builder.AppendLine();
}
return builder.ToString();
}
private static void AppendMappingLocation(StringBuilder builder, SourceSpan location, string content)
{
builder
.AppendLine(location.ToString())
.Append("|");
for (var i = 0; i < location.Length; i++)
{
builder.Append(content[location.AbsoluteIndex + i]);
}
builder.AppendLine("|");
}
}

Просмотреть файл

@ -1,81 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.AspNetCore.Razor.Language;
using Xunit;
namespace Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X;
public class TagHelperDescriptorExtensionsTest
{
[Fact]
public void IsViewComponentKind_ReturnsFalse_ForNonVCTHDescriptor()
{
// Arrange
var tagHelper = CreateTagHelperDescriptor();
// Act
var result = tagHelper.IsViewComponentKind();
// Assert
Assert.False(result);
}
[Fact]
public void IsViewComponentKind_ReturnsTrue_ForVCTHDescriptor()
{
// Arrange
var tagHelper = CreateViewComponentTagHelperDescriptor();
// Act
var result = tagHelper.IsViewComponentKind();
// Assert
Assert.True(result);
}
[Fact]
public void GetViewComponentName_ReturnsNull_ForNonVCTHDescriptor()
{
//Arrange
var tagHelper = CreateTagHelperDescriptor();
// Act
var result = tagHelper.GetViewComponentName();
// Assert
Assert.Null(result);
}
[Fact]
public void GetViewComponentName_ReturnsName_ForVCTHDescriptor()
{
// Arrange
var tagHelper = CreateViewComponentTagHelperDescriptor("ViewComponentName");
// Act
var result = tagHelper.GetViewComponentName();
// Assert
Assert.Equal("ViewComponentName", result);
}
private static TagHelperDescriptor CreateTagHelperDescriptor()
{
var tagHelper = TagHelperDescriptorBuilder.Create("TypeName", "AssemblyName")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("tag-name"))
.Build();
return tagHelper;
}
private static TagHelperDescriptor CreateViewComponentTagHelperDescriptor(string name = "ViewComponentName")
{
var tagHelper = TagHelperDescriptorBuilder.Create(ViewComponentTagHelperConventions.Kind, "TypeName", "AssemblyName")
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("tag-name"))
.AddMetadata(ViewComponentTagHelperMetadata.Name, name)
.Build();
return tagHelper;
}
}

Просмотреть файл

@ -1,8 +0,0 @@
<div class="@this.ToString()">
Hello world
@string.Format("{0}", "Hello")
</div>
@{
var cls = "foo";
}
<p class="@if(cls != null) { @cls }" />

Просмотреть файл

@ -1,71 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
__o = this.ToString();
#line default
#line hidden
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
__o = string.Format("{0}", "Hello");
#line default
#line hidden
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
var cls = "foo";
#line default
#line hidden
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
if(cls != null) {
#line default
#line hidden
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
__o = cls;
#line default
#line hidden
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
}
#line default
#line hidden
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,63 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
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
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (0:0,0 [4] Basic.cshtml)
LazyIntermediateToken - (0:0,0 [4] Basic.cshtml) - Html - <div
HtmlAttribute - (4:0,4 [25] Basic.cshtml) - class=" - "
CSharpExpressionAttributeValue - (12:0,12 [16] Basic.cshtml) -
LazyIntermediateToken - (13:0,13 [15] Basic.cshtml) - CSharp - this.ToString()
HtmlContent - (29:0,29 [24] Basic.cshtml)
LazyIntermediateToken - (29:0,29 [1] Basic.cshtml) - Html - >
LazyIntermediateToken - (30:0,30 [23] Basic.cshtml) - Html - \n Hello world\n
CSharpExpression - (54:2,5 [29] Basic.cshtml)
LazyIntermediateToken - (54:2,5 [29] Basic.cshtml) - CSharp - string.Format("{0}", "Hello")
HtmlContent - (83:2,34 [10] Basic.cshtml)
LazyIntermediateToken - (83:2,34 [2] Basic.cshtml) - Html - \n
LazyIntermediateToken - (85:3,0 [6] Basic.cshtml) - Html - </div>
LazyIntermediateToken - (91:3,6 [2] Basic.cshtml) - Html - \n
CSharpCode - (95:4,2 [25] Basic.cshtml)
LazyIntermediateToken - (95:4,2 [25] Basic.cshtml) - CSharp - \n var cls = "foo";\n
HtmlContent - (123:7,0 [2] Basic.cshtml)
LazyIntermediateToken - (123:7,0 [2] Basic.cshtml) - Html - <p
HtmlAttribute - (125:7,2 [34] Basic.cshtml) - class=" - "
CSharpCodeAttributeValue - (133:7,10 [25] Basic.cshtml) -
LazyIntermediateToken - (134:7,11 [18] Basic.cshtml) - CSharp - if(cls != null) {
CSharpExpression - (153:7,30 [3] Basic.cshtml)
LazyIntermediateToken - (153:7,30 [3] Basic.cshtml) - CSharp - cls
LazyIntermediateToken - (156:7,33 [2] Basic.cshtml) - CSharp - }
HtmlContent - (159:7,36 [5] Basic.cshtml)
LazyIntermediateToken - (159:7,36 [1] Basic.cshtml) - Html -
LazyIntermediateToken - (160:7,37 [2] Basic.cshtml) - Html - />
LazyIntermediateToken - (162:7,39 [2] Basic.cshtml) - Html - \n
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,34 +0,0 @@
Source Location: (13:0,13 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|this.ToString()|
Generated Location: (1030:26,13 [15] )
|this.ToString()|
Source Location: (54:2,5 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|string.Format("{0}", "Hello")|
Generated Location: (1166:31,6 [29] )
|string.Format("{0}", "Hello")|
Source Location: (95:4,2 [25] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|
var cls = "foo";
|
Generated Location: (1312:36,2 [25] )
|
var cls = "foo";
|
Source Location: (134:7,11 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|if(cls != null) { |
Generated Location: (1460:42,11 [18] )
|if(cls != null) { |
Source Location: (153:7,30 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
|cls|
Generated Location: (1622:47,30 [3] )
|cls|
Source Location: (156:7,33 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml)
| }|
Generated Location: (1773:52,33 [2] )
| }|

Просмотреть файл

@ -1,92 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4120ddad9d4353ed260e0585fe71080d78ff8ab3"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
BeginContext(0, 4, true);
WriteLiteral("<div");
EndContext();
BeginWriteAttribute("class", " class=\"", 4, "\"", 28, 1);
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
WriteAttributeValue("", 12, this.ToString(), 12, 16, false);
#line default
#line hidden
EndWriteAttribute();
BeginContext(29, 24, true);
WriteLiteral(">\r\n Hello world\r\n ");
EndContext();
BeginContext(54, 29, false);
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
Write(string.Format("{0}", "Hello"));
#line default
#line hidden
EndContext();
BeginContext(83, 10, true);
WriteLiteral("\r\n</div>\r\n");
EndContext();
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
var cls = "foo";
#line default
#line hidden
BeginContext(123, 2, true);
WriteLiteral("<p");
EndContext();
BeginWriteAttribute("class", " class=\"", 125, "\"", 158, 1);
WriteAttributeValue("", 133, new Microsoft.AspNetCore.Mvc.Razor.HelperResult(async(__razor_attribute_value_writer) => {
PushWriter(__razor_attribute_value_writer);
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
if(cls != null) {
#line default
#line hidden
BeginContext(153, 3, false);
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
Write(cls);
#line default
#line hidden
EndContext();
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Basic.cshtml"
}
#line default
#line hidden
PopWriter();
}
), 133, 25, false);
EndWriteAttribute();
BeginContext(159, 5, true);
WriteLiteral(" />\r\n");
EndContext();
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,72 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Basic_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
CSharpCode -
IntermediateToken - - CSharp - BeginContext(0, 4, true);
HtmlContent - (0:0,0 [4] Basic.cshtml)
IntermediateToken - (0:0,0 [4] Basic.cshtml) - Html - <div
CSharpCode -
IntermediateToken - - CSharp - EndContext();
HtmlAttribute - (4:0,4 [25] Basic.cshtml) - class=" - "
CSharpExpressionAttributeValue - (12:0,12 [16] Basic.cshtml) -
IntermediateToken - (13:0,13 [15] Basic.cshtml) - CSharp - this.ToString()
CSharpCode -
IntermediateToken - - CSharp - BeginContext(29, 24, true);
HtmlContent - (29:0,29 [24] Basic.cshtml)
IntermediateToken - (29:0,29 [1] Basic.cshtml) - Html - >
IntermediateToken - (30:0,30 [19] Basic.cshtml) - Html - \n Hello world\n
IntermediateToken - (49:2,0 [4] Basic.cshtml) - Html -
CSharpCode -
IntermediateToken - - CSharp - EndContext();
CSharpCode -
IntermediateToken - - CSharp - BeginContext(54, 29, false);
CSharpExpression - (54:2,5 [29] Basic.cshtml)
IntermediateToken - (54:2,5 [29] Basic.cshtml) - CSharp - string.Format("{0}", "Hello")
CSharpCode -
IntermediateToken - - CSharp - EndContext();
CSharpCode -
IntermediateToken - - CSharp - BeginContext(83, 10, true);
HtmlContent - (83:2,34 [10] Basic.cshtml)
IntermediateToken - (83:2,34 [2] Basic.cshtml) - Html - \n
IntermediateToken - (85:3,0 [6] Basic.cshtml) - Html - </div>
IntermediateToken - (91:3,6 [2] Basic.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
CSharpCode - (95:4,2 [25] Basic.cshtml)
IntermediateToken - (95:4,2 [25] Basic.cshtml) - CSharp - \n var cls = "foo";\n
CSharpCode -
IntermediateToken - - CSharp - BeginContext(123, 2, true);
HtmlContent - (123:7,0 [2] Basic.cshtml)
IntermediateToken - (123:7,0 [2] Basic.cshtml) - Html - <p
CSharpCode -
IntermediateToken - - CSharp - EndContext();
HtmlAttribute - (125:7,2 [34] Basic.cshtml) - class=" - "
CSharpCodeAttributeValue - (133:7,10 [25] Basic.cshtml) -
IntermediateToken - (134:7,11 [18] Basic.cshtml) - CSharp - if(cls != null) {
CSharpCode -
IntermediateToken - - CSharp - BeginContext(153, 3, false);
CSharpExpression - (153:7,30 [3] Basic.cshtml)
IntermediateToken - (153:7,30 [3] Basic.cshtml) - CSharp - cls
CSharpCode -
IntermediateToken - - CSharp - EndContext();
IntermediateToken - (156:7,33 [2] Basic.cshtml) - CSharp - }
CSharpCode -
IntermediateToken - - CSharp - BeginContext(159, 5, true);
HtmlContent - (159:7,36 [5] Basic.cshtml)
IntermediateToken - (159:7,36 [3] Basic.cshtml) - Html - />
IntermediateToken - (162:7,39 [2] Basic.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,8 +0,0 @@
@* These test files validate that end-to-end, incomplete directives don't throw. *@
@model
@model
@inject
@inject
@inject MyService<TModel>

Просмотреть файл

@ -1,64 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml"
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml"
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml"
MyService<TModel> __typeHelper = default;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,6 +0,0 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,7): Error RZ1013: The 'model' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,1): Error RZ2001: The 'model' directive may only occur once per document.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,8): Error RZ1013: The 'model' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(6,8): Error RZ1013: The 'inject' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,9): Error RZ1013: The 'inject' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,26): Error RZ1015: The 'inject' directive expects an identifier.

Просмотреть файл

@ -1,58 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
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 - (102:3,7 [0] IncompleteDirectives.cshtml) -
DirectiveToken - (123:6,8 [0] IncompleteDirectives.cshtml) -
DirectiveToken - (133:7,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (85:1,0 [2] IncompleteDirectives.cshtml)
LazyIntermediateToken - (85:1,0 [2] IncompleteDirectives.cshtml) - Html - \n
MalformedDirective - (87:2,0 [6] IncompleteDirectives.cshtml) - model
HtmlContent - (93:2,6 [2] IncompleteDirectives.cshtml)
LazyIntermediateToken - (93:2,6 [2] IncompleteDirectives.cshtml) - Html - \n
MalformedDirective - (95:3,0 [7] IncompleteDirectives.cshtml) - model
DirectiveToken - (102:3,7 [0] IncompleteDirectives.cshtml) -
HtmlContent - (102:3,7 [4] IncompleteDirectives.cshtml)
LazyIntermediateToken - (102:3,7 [4] IncompleteDirectives.cshtml) - Html - \n\n
MalformedDirective - (106:5,0 [7] IncompleteDirectives.cshtml) - inject
HtmlContent - (113:5,7 [2] IncompleteDirectives.cshtml)
LazyIntermediateToken - (113:5,7 [2] IncompleteDirectives.cshtml) - Html - \n
MalformedDirective - (115:6,0 [8] IncompleteDirectives.cshtml) - inject
DirectiveToken - (123:6,8 [0] IncompleteDirectives.cshtml) -
HtmlContent - (123:6,8 [2] IncompleteDirectives.cshtml)
LazyIntermediateToken - (123:6,8 [2] IncompleteDirectives.cshtml) - Html - \n
MalformedDirective - (125:7,0 [25] IncompleteDirectives.cshtml) - inject
DirectiveToken - (133:7,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
HtmlContent - (150:7,25 [2] IncompleteDirectives.cshtml)
LazyIntermediateToken - (150:7,25 [2] IncompleteDirectives.cshtml) - Html - \n
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,15 +0,0 @@
Source Location: (102:3,7 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
||
Generated Location: (776:19,0 [0] )
||
Source Location: (123:6,8 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
||
Generated Location: (966:27,0 [0] )
||
Source Location: (133:7,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml)
|MyService<TModel>|
Generated Location: (1156:35,0 [17] )
|MyService<TModel>|

Просмотреть файл

@ -1,51 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "844eb91b909a14b78feddd5e6866563b5a75e021"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
BeginContext(83, 4, true);
WriteLiteral("\r\n\r\n");
EndContext();
BeginContext(93, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(102, 4, true);
WriteLiteral("\r\n\r\n");
EndContext();
BeginContext(113, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(123, 2, true);
WriteLiteral("\r\n");
EndContext();
BeginContext(150, 2, true);
WriteLiteral("\r\n");
EndContext();
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,6 +0,0 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,7): Error RZ9999: The 'model' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,1): Error RZ9999: The 'model' directive may only occur once per document.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,8): Error RZ9999: The 'model' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(6,8): Error RZ9999: The 'inject' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,9): Error RZ9999: The 'inject' directive expects a type name.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,26): Error RZ9999: The 'inject' directive expects an identifier.

Просмотреть файл

@ -1,58 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteDirectives_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
CSharpCode -
IntermediateToken - - CSharp - BeginContext(83, 4, true);
HtmlContent - (83:0,83 [4] IncompleteDirectives.cshtml)
IntermediateToken - (83:0,83 [4] IncompleteDirectives.cshtml) - Html - \n\n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
MalformedDirective - (87:2,0 [6] IncompleteDirectives.cshtml) - model
CSharpCode -
IntermediateToken - - CSharp - BeginContext(93, 2, true);
HtmlContent - (93:2,6 [2] IncompleteDirectives.cshtml)
IntermediateToken - (93:2,6 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
MalformedDirective - (95:3,0 [7] IncompleteDirectives.cshtml) - model
CSharpCode -
IntermediateToken - - CSharp - BeginContext(102, 4, true);
HtmlContent - (102:3,7 [4] IncompleteDirectives.cshtml)
IntermediateToken - (102:3,7 [4] IncompleteDirectives.cshtml) - Html - \n\n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
MalformedDirective - (106:5,0 [7] IncompleteDirectives.cshtml) - inject
CSharpCode -
IntermediateToken - - CSharp - BeginContext(113, 2, true);
HtmlContent - (113:5,7 [2] IncompleteDirectives.cshtml)
IntermediateToken - (113:5,7 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
MalformedDirective - (115:6,0 [8] IncompleteDirectives.cshtml) - inject
CSharpCode -
IntermediateToken - - CSharp - BeginContext(123, 2, true);
HtmlContent - (123:6,8 [2] IncompleteDirectives.cshtml)
IntermediateToken - (123:6,8 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
MalformedDirective - (125:7,0 [25] IncompleteDirectives.cshtml) - inject
DirectiveToken - (133:7,8 [17] IncompleteDirectives.cshtml) - MyService<TModel>
CSharpCode -
IntermediateToken - - CSharp - BeginContext(150, 2, true);
HtmlContent - (150:7,25 [2] IncompleteDirectives.cshtml)
IntermediateToken - (150:7,25 [2] IncompleteDirectives.cshtml) - Html - \n
CSharpCode -
IntermediateToken - - CSharp - EndContext();
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,2 +0,0 @@
@inherits MyBasePageForViews<TModel>
@model MyModel

Просмотреть файл

@ -1,56 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel : MyBasePageForViews<MyModel>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml"
MyBasePageForViews<TModel> __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml"
MyModel __typeHelper = default;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<MyModel> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,37 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel - 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 - (10:0,10 [26] InheritsViewModel.cshtml) - MyBasePageForViews<TModel>
DirectiveToken - (45:1,7 [7] InheritsViewModel.cshtml) - MyModel
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,10 +0,0 @@
Source Location: (10:0,10 [26] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml)
|MyBasePageForViews<TModel>|
Generated Location: (740:19,0 [26] )
|MyBasePageForViews<TModel>|
Source Location: (45:1,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml)
|MyModel|
Generated Location: (976:27,0 [7] )
|MyModel|

Просмотреть файл

@ -1,33 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsViewModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "91cf923452a86b2906083cb0236d6d5b3bc528ef"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml : MyBasePageForViews<MyModel>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<MyModel> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,16 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsViewModel_cshtml - MyBasePageForViews<MyModel> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,48 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports : MyBasePageForViews<MyModel>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml"
MyModel __typeHelper = default;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<MyModel> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,37 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports - 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 - (10:0,10 [26] TestFiles\IntegrationTests\CodeGenerationIntegrationTest\_ViewImports.cshtml) - MyBasePageForViews<TModel>
DirectiveToken - (7:0,7 [7] InheritsWithViewImports.cshtml) - MyModel
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

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

Просмотреть файл

@ -1,33 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InheritsWithViewImports.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "cf2e52e7d1326775fe4ece983a7f8ee1f62235a0"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml : MyBasePageForViews<MyModel>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<MyModel> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,16 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InheritsWithViewImports_cshtml - MyBasePageForViews<MyModel> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1 +0,0 @@
@inject MyApp MyPropertyName

Просмотреть файл

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

Просмотреть файл

@ -1,82 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml"
MyModel __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml"
MyApp __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml"
global::System.Object MyPropertyName = null;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml"
MyService<TModel> __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml"
global::System.Object Html = null;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,41 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<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 - (7:0,7 [7] InjectWithModel.cshtml) - MyModel
DirectiveToken - (24:1,8 [5] InjectWithModel.cshtml) - MyApp
DirectiveToken - (30:1,14 [14] InjectWithModel.cshtml) - MyPropertyName
DirectiveToken - (54:2,8 [17] InjectWithModel.cshtml) - MyService<TModel>
DirectiveToken - (72:2,26 [4] InjectWithModel.cshtml) - Html
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,25 +0,0 @@
Source Location: (7:0,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyModel|
Generated Location: (766:19,0 [7] )
|MyModel|
Source Location: (24:1,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyApp|
Generated Location: (981:27,0 [5] )
|MyApp|
Source Location: (30:1,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyPropertyName|
Generated Location: (1216:35,22 [14] )
|MyPropertyName|
Source Location: (54:2,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|MyService<TModel>|
Generated Location: (1422:43,0 [17] )
|MyService<TModel>|
Source Location: (72:2,26 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml)
|Html|
Generated Location: (1669:51,22 [4] )
|Html|

Просмотреть файл

@ -1,35 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithModel.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a039b7091118c718dc3023b6ac58d9645cb58e59"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,17 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithModel_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,5 +0,0 @@
@model MyModel
@inject MyApp MyPropertyName;
@inject MyService<TModel> Html;
@inject MyApp MyPropertyName2 ;
@inject MyService<TModel> Html2 ;

Просмотреть файл

@ -1,118 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
MyModel __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
MyApp __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 2 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
global::System.Object MyPropertyName = null;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
MyService<TModel> __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
global::System.Object Html = null;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
MyApp __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
global::System.Object MyPropertyName2 = null;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
MyService<TModel> __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml"
global::System.Object Html2 = null;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html2 { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName2 { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,47 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<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 - (7:0,7 [7] InjectWithSemicolon.cshtml) - MyModel
DirectiveToken - (24:1,8 [5] InjectWithSemicolon.cshtml) - MyApp
DirectiveToken - (30:1,14 [14] InjectWithSemicolon.cshtml) - MyPropertyName
DirectiveToken - (58:2,8 [17] InjectWithSemicolon.cshtml) - MyService<TModel>
DirectiveToken - (76:2,26 [4] InjectWithSemicolon.cshtml) - Html
DirectiveToken - (93:3,8 [5] InjectWithSemicolon.cshtml) - MyApp
DirectiveToken - (99:3,14 [15] InjectWithSemicolon.cshtml) - MyPropertyName2
DirectiveToken - (129:4,8 [17] InjectWithSemicolon.cshtml) - MyService<TModel>
DirectiveToken - (147:4,26 [5] InjectWithSemicolon.cshtml) - Html2
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,45 +0,0 @@
Source Location: (7:0,7 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyModel|
Generated Location: (774:19,0 [7] )
|MyModel|
Source Location: (24:1,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyApp|
Generated Location: (993:27,0 [5] )
|MyApp|
Source Location: (30:1,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyPropertyName|
Generated Location: (1232:35,22 [14] )
|MyPropertyName|
Source Location: (58:2,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyService<TModel>|
Generated Location: (1442:43,0 [17] )
|MyService<TModel>|
Source Location: (76:2,26 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|Html|
Generated Location: (1693:51,22 [4] )
|Html|
Source Location: (93:3,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyApp|
Generated Location: (1893:59,0 [5] )
|MyApp|
Source Location: (99:3,14 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyPropertyName2|
Generated Location: (2132:67,22 [15] )
|MyPropertyName2|
Source Location: (129:4,8 [17] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|MyService<TModel>|
Generated Location: (2343:75,0 [17] )
|MyService<TModel>|
Source Location: (147:4,26 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml)
|Html2|
Generated Location: (2594:83,22 [5] )
|Html2|

Просмотреть файл

@ -1,39 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InjectWithSemicolon.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5010aab35d235175dab517f8018e41aee9a2ac7f"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html2 { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName2 { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyService<MyModel> Html { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,19 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InjectWithSemicolon_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<MyModel> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,58 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml"
MyApp __typeHelper = default;
#line default
#line hidden
}
))();
((System.Action)(() => {
#line 1 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml"
global::System.Object MyPropertyName = null;
#line default
#line hidden
}
))();
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,38 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
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 - (8:0,8 [5] Inject.cshtml) - MyApp
DirectiveToken - (14:0,14 [14] Inject.cshtml) - MyPropertyName
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,10 +0,0 @@
Source Location: (8:0,8 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml)
|MyApp|
Generated Location: (748:19,0 [5] )
|MyApp|
Source Location: (14:0,14 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml)
|MyPropertyName|
Generated Location: (974:27,22 [14] )
|MyPropertyName|

Просмотреть файл

@ -1,35 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/Inject.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c711078454f5b0e8d2cb77d9cb7fa88cca32b884"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public MyApp MyPropertyName { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1,17 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_Inject_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
Inject -
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,40 +0,0 @@
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using TModel = global::System.Object;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 219
private void __RazorDirectiveTokenHelpers__() {
}
#pragma warning restore 219
#pragma warning disable 0414
private static System.Object __o = null;
#pragma warning restore 0414
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1 +0,0 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml(1,2): Error RZ1007: "namespace" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used.

Просмотреть файл

@ -1,37 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - - TModel = global::System.Object
UsingDirective - (1:0,1 [12] ) - System
UsingDirective - (16:1,1 [32] ) - System.Collections.Generic
UsingDirective - (51:2,1 [17] ) - System.Linq
UsingDirective - (71:3,1 [28] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [30] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [40] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [43] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
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
CSharpCode -
IntermediateToken - - CSharp - #pragma warning disable 0414
CSharpCode -
IntermediateToken - - CSharp - private static System.Object __o = null;
CSharpCode -
IntermediateToken - - CSharp - #pragma warning restore 0414
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
HtmlContent - (10:0,10 [6] InvalidNamespaceAtEOF.cshtml)
LazyIntermediateToken - (10:0,10 [6] InvalidNamespaceAtEOF.cshtml) - Html - Test.
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1,36 +0,0 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "de132bd3e2a46a0d2ec953a168427c01e5829cde"
// <auto-generated/>
#pragma warning disable 1591
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF_cshtml : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
BeginContext(10, 6, true);
WriteLiteral(" Test.");
EndContext();
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
}
}
#pragma warning restore 1591

Просмотреть файл

@ -1 +0,0 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/InvalidNamespaceAtEOF.cshtml(1,2): Error RZ9999: "namespace" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used.

Просмотреть файл

@ -1,22 +0,0 @@
Document -
NamespaceDeclaration - - AspNetCore
UsingDirective - (1:0,1 [14] ) - System
UsingDirective - (16:1,1 [34] ) - System.Collections.Generic
UsingDirective - (51:2,1 [19] ) - System.Linq
UsingDirective - (71:3,1 [30] ) - System.Threading.Tasks
UsingDirective - (102:4,1 [32] ) - Microsoft.AspNetCore.Mvc
UsingDirective - (135:5,1 [42] ) - Microsoft.AspNetCore.Mvc.Rendering
UsingDirective - (178:6,1 [45] ) - Microsoft.AspNetCore.Mvc.ViewFeatures
ClassDeclaration - - public - TestFiles_IntegrationTests_CodeGenerationIntegrationTest_InvalidNamespaceAtEOF_cshtml - global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<dynamic> -
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
CSharpCode -
IntermediateToken - - CSharp - BeginContext(10, 6, true);
HtmlContent - (10:0,10 [6] InvalidNamespaceAtEOF.cshtml)
IntermediateToken - (10:0,10 [6] InvalidNamespaceAtEOF.cshtml) - Html - Test.
CSharpCode -
IntermediateToken - - CSharp - EndContext();
Inject -
Inject -
Inject -
Inject -
Inject -

Просмотреть файл

@ -1 +0,0 @@
@model System.Collections.IEnumerable

Просмотреть файл

@ -1,6 +0,0 @@
@model DateTime
@addTagHelper "InputTestTagHelper, AppCode"
<input-test for="Date" />
<input-test for="@Model" />

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше