зеркало из https://github.com/dotnet/razor.git
Merge branch 'release/dev17.11' into main
This commit is contained in:
Коммит
692783799f
|
@ -44,10 +44,19 @@ public class TestTagHelperDescriptors
|
|||
.Name("age")
|
||||
.Metadata(PropertyName("AgeProp"))
|
||||
.TypeName("System.Int32"),
|
||||
builder => builder
|
||||
.Name("alive")
|
||||
.Metadata(PropertyName("AliveProp"))
|
||||
.TypeName("System.Boolean"),
|
||||
builder => builder
|
||||
.Name("tag")
|
||||
.Metadata(PropertyName("TagProp"))
|
||||
.TypeName("System.Object"),
|
||||
builder => builder
|
||||
.Name("tuple-dictionary")
|
||||
.Metadata(PropertyName("DictionaryOfBoolAndStringTupleProperty"))
|
||||
.TypeName(typeof(IDictionary<string, int>).Namespace + ".IDictionary<System.String, (System.Boolean, System.String)>")
|
||||
.AsDictionaryAttribute("tuple-prefix-", typeof((bool, string)).FullName)
|
||||
})
|
||||
};
|
||||
}
|
||||
|
|
|
@ -475,6 +475,11 @@ public class TagHelperBlockRewriterTest : TagHelperRewritingTestBase
|
|||
.Name("name")
|
||||
.Metadata(PropertyName("Name"))
|
||||
.TypeName(typeof(string).FullName))
|
||||
.BoundAttributeDescriptor(attribute =>
|
||||
attribute
|
||||
.Name("alive")
|
||||
.Metadata(PropertyName("Alive"))
|
||||
.TypeName(typeof(bool).FullName))
|
||||
.BoundAttributeDescriptor(attribute =>
|
||||
attribute
|
||||
.Name("tag")
|
||||
|
@ -638,6 +643,61 @@ public class TagHelperBlockRewriterTest : TagHelperRewritingTestBase
|
|||
""");
|
||||
}
|
||||
|
||||
[Fact, WorkItem("https://github.com/dotnet/razor/issues/10186")]
|
||||
public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes20()
|
||||
{
|
||||
EvaluateData(CodeTagHelperAttributes_Descriptors, """
|
||||
@{
|
||||
var isAlive = true;
|
||||
}
|
||||
<person alive="!@isAlive" />
|
||||
""");
|
||||
}
|
||||
|
||||
[Fact, WorkItem("https://github.com/dotnet/razor/issues/10186")]
|
||||
public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes21()
|
||||
{
|
||||
EvaluateData(CodeTagHelperAttributes_Descriptors, """
|
||||
@{
|
||||
var obj = new { Prop = (object)1 };
|
||||
}
|
||||
<person age="(int)@obj.Prop" />
|
||||
""");
|
||||
}
|
||||
|
||||
[Fact, WorkItem("https://github.com/dotnet/razor/issues/10186")]
|
||||
public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes22()
|
||||
{
|
||||
EvaluateData(CodeTagHelperAttributes_Descriptors, """
|
||||
@{
|
||||
var obj = new { Prop = (object)1 };
|
||||
}
|
||||
<person tag="new { @params = 1 }" />
|
||||
""");
|
||||
}
|
||||
|
||||
[Fact, WorkItem("https://github.com/dotnet/razor/issues/10186")]
|
||||
public void CreatesMarkupCodeSpansForNonStringTagHelperAttributes23()
|
||||
{
|
||||
EvaluateData(
|
||||
[TagHelperDescriptorBuilder
|
||||
.Create("InputTagHelper", "SomeAssembly")
|
||||
.TagMatchingRuleDescriptor(rule => rule.RequireTagName("input"))
|
||||
.BoundAttributeDescriptor(attribute =>
|
||||
attribute
|
||||
.Name("tuple-dictionary")
|
||||
.Metadata(PropertyName("DictionaryOfBoolAndStringTupleProperty"))
|
||||
.TypeName(typeof(IDictionary<string, int>).Namespace + ".IDictionary<System.String, (System.Boolean, System.String)>")
|
||||
.AsDictionaryAttribute("tuple-prefix-", typeof((bool, string)).FullName))
|
||||
.Build()],
|
||||
"""
|
||||
@{
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
}
|
||||
<input tuple-prefix-test='(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))' />
|
||||
""");
|
||||
}
|
||||
|
||||
[Fact, WorkItem("https://github.com/dotnet/razor/issues/10426")]
|
||||
public void CreatesMarkupCodeSpans_EscapedExpression_01()
|
||||
{
|
||||
|
|
|
@ -2,5 +2,10 @@
|
|||
|
||||
@{
|
||||
var count = "1";
|
||||
var alive = true;
|
||||
var obj = new { age = (object)1 };
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
}
|
||||
<input age="Convert.ToInt32(@count)" />
|
||||
<input age="Convert.ToInt32(@count)" alive="!@alive" />
|
||||
<input age="(int)@obj.age" tag="new { @params = 1 }" />
|
||||
<input tuple-prefix-test='(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))' />
|
||||
|
|
|
@ -49,15 +49,50 @@ global::System.Object __typeHelper = "*, TestAssembly";
|
|||
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
|
||||
var count = "1";
|
||||
var alive = true;
|
||||
var obj = new { age = (object)1 };
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||
#nullable restore
|
||||
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
__InputTagHelper.AgeProp = Convert.ToInt32(@count);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
#nullable restore
|
||||
#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
__InputTagHelper.AliveProp = !@alive;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||
#nullable restore
|
||||
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
__InputTagHelper.AgeProp = (int)@obj.age;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
#nullable restore
|
||||
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
__InputTagHelper.TagProp = new { @params = 1 };
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||
#nullable restore
|
||||
#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
__InputTagHelper.DictionaryOfBoolAndStringTupleProperty["test"] = (@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
|
|
|
@ -2,5 +2,10 @@
|
|||
|
||||
~~
|
||||
~~~ ~~~~~ ~ ~~~~
|
||||
~~~ ~~~~~ ~ ~~~~~
|
||||
~~~ ~~~ ~ ~~~ ~ ~~~ ~ ~~~~~~~~~ ~~
|
||||
~~~ ~~~~ ~ ~~~ ~ ~~~~~ ~ ~~~ ~~~~~~~~~~~~~~~~~~~~~ ~ ~~~~~~ ~~~~~ ~ ~~
|
||||
~
|
||||
<input age="~~~~~~~~~~~~~~~~~~~~~~~" />
|
||||
<input age="~~~~~~~~~~~~~~~~~~~~~~~" alive="~~~~~~~" />
|
||||
<input age="~~~~~~~~~~~~~" tag="~~~ ~ ~~~~~~~ ~ ~ ~" />
|
||||
<input tuple-prefix-test='~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~' />
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml(7,41): error CS0234: The type or namespace name 'List<>' does not exist in the namespace 'System' (are you missing an assembly reference?)
|
||||
// var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
Diagnostic(ErrorCode.ERR_DottedTypeNameNotFoundInNS, "List<string>").WithArguments("List<>", "System").WithLocation(7, 41)
|
|
@ -12,17 +12,41 @@ Generated Location: (31:0,31 [4] )
|
|||
|
||||
|
|
||||
|
||||
Source Location: (62:4,1 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
Source Location: (201:7,1 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|
|
||||
<input age="|
|
||||
Generated Location: (62:4,1 [14] )
|
||||
Generated Location: (201:7,1 [14] )
|
||||
|
|
||||
<input age="|
|
||||
|
||||
Source Location: (99:5,35 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
Source Location: (238:8,35 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|" alive="|
|
||||
Generated Location: (238:8,35 [9] )
|
||||
|" alive="|
|
||||
|
||||
Source Location: (254:8,51 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|" />
|
||||
<input age="|
|
||||
Generated Location: (254:8,51 [18] )
|
||||
|" />
|
||||
<input age="|
|
||||
|
||||
Source Location: (285:9,25 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|" tag="|
|
||||
Generated Location: (285:9,25 [7] )
|
||||
|" tag="|
|
||||
|
||||
Source Location: (311:9,51 [32] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|" />
|
||||
<input tuple-prefix-test='|
|
||||
Generated Location: (311:9,51 [32] )
|
||||
|" />
|
||||
<input tuple-prefix-test='|
|
||||
|
||||
Source Location: (467:10,150 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|' />
|
||||
|
|
||||
Generated Location: (99:5,35 [6] )
|
||||
|" />
|
||||
Generated Location: (467:10,150 [6] )
|
||||
|' />
|
||||
|
|
||||
|
||||
|
|
|
@ -37,16 +37,36 @@
|
|||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (31:0,31 [4] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (31:0,31 [4] EscapedIdentifier.cshtml) - Html - \n\n
|
||||
CSharpCode - (37:2,2 [24] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (37:2,2 [24] EscapedIdentifier.cshtml) - CSharp - \n var count = "1";\n
|
||||
TagHelper - (64:5,0 [39] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
CSharpCode - (37:2,2 [163] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (37:2,2 [163] EscapedIdentifier.cshtml) - CSharp - \n var count = "1";\n var alive = true;\n var obj = new { age = (object)1 };\n var item = new { Items = new System.List<string>() { "one", "two" } };\n
|
||||
TagHelper - (203:8,0 [55] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (76:5,12 [23] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (76:5,12 [23] EscapedIdentifier.cshtml) - CSharp - Convert.ToInt32(@count)
|
||||
DefaultTagHelperProperty - (215:8,12 [23] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (215:8,12 [23] EscapedIdentifier.cshtml) - CSharp - Convert.ToInt32(@count)
|
||||
DefaultTagHelperProperty - (247:8,44 [7] EscapedIdentifier.cshtml) - alive - bool InputTagHelper.AliveProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (247:8,44 [7] EscapedIdentifier.cshtml) - CSharp - !@alive
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (103:5,39 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (103:5,39 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
HtmlContent - (258:8,55 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (258:8,55 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
TagHelper - (260:9,0 [55] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (272:9,12 [13] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (272:9,12 [13] EscapedIdentifier.cshtml) - CSharp - (int)@obj.age
|
||||
DefaultTagHelperProperty - (292:9,32 [19] EscapedIdentifier.cshtml) - tag - object InputTagHelper.TagProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (292:9,32 [19] EscapedIdentifier.cshtml) - CSharp - new { @params = 1 }
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (315:9,55 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (315:9,55 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
TagHelper - (317:10,0 [154] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (343:10,26 [124] EscapedIdentifier.cshtml) - tuple-prefix-test - System.Collections.Generic.IDictionary<System.String, (System.Boolean, System.String)> InputTagHelper.DictionaryOfBoolAndStringTupleProperty - HtmlAttributeValueStyle.SingleQuotes
|
||||
LazyIntermediateToken - (343:10,26 [124] EscapedIdentifier.cshtml) - CSharp - (@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (471:10,154 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (471:10,154 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
@ -3,17 +3,43 @@
|
|||
Generated Location: (1707:32,37 [17] )
|
||||
|"*, TestAssembly"|
|
||||
|
||||
Source Location: (37:2,2 [24] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
Source Location: (37:2,2 [163] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|
|
||||
var count = "1";
|
||||
var alive = true;
|
||||
var obj = new { age = (object)1 };
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
|
|
||||
Generated Location: (2215:49,2 [24] )
|
||||
Generated Location: (2215:49,2 [163] )
|
||||
|
|
||||
var count = "1";
|
||||
var alive = true;
|
||||
var obj = new { age = (object)1 };
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
|
|
||||
|
||||
Source Location: (76:5,12 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
Source Location: (215:8,12 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|Convert.ToInt32(@count)|
|
||||
Generated Location: (2503:58,27 [23] )
|
||||
Generated Location: (2642:61,27 [23] )
|
||||
|Convert.ToInt32(@count)|
|
||||
|
||||
Source Location: (247:8,44 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|!@alive|
|
||||
Generated Location: (2874:68,44 [7] )
|
||||
|!@alive|
|
||||
|
||||
Source Location: (272:9,12 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|(int)@obj.age|
|
||||
Generated Location: (3225:77,27 [13] )
|
||||
|(int)@obj.age|
|
||||
|
||||
Source Location: (292:9,32 [19] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|new { @params = 1 }|
|
||||
Generated Location: (3436:84,32 [19] )
|
||||
|new { @params = 1 }|
|
||||
|
||||
Source Location: (343:10,26 [124] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml)
|
||||
|(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))|
|
||||
Generated Location: (3838:93,66 [124] )
|
||||
|(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))|
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "56fbfd01b420ab12628e8f5c23b2e88ef109db5398f18d87931cf424410b93c8"
|
||||
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "8fc172b55ced462a1746f1082869701d161cf36fd24dacd8d9fa98cc66d744ad"
|
||||
// <auto-generated/>
|
||||
#pragma warning disable 1591
|
||||
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EscapedIdentifier), @"mvc.1.0.view", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml")]
|
||||
|
@ -14,7 +14,7 @@ namespace AspNetCore
|
|||
using global::Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
#line default
|
||||
#line hidden
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"56fbfd01b420ab12628e8f5c23b2e88ef109db5398f18d87931cf424410b93c8", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml")]
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"Sha256", @"8fc172b55ced462a1746f1082869701d161cf36fd24dacd8d9fa98cc66d744ad", @"/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml")]
|
||||
[global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemMetadataAttribute("Identifier", "/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml")]
|
||||
[global::System.Runtime.CompilerServices.CreateNewOnMetadataUpdateAttribute]
|
||||
#nullable restore
|
||||
|
@ -47,9 +47,12 @@ namespace AspNetCore
|
|||
{
|
||||
WriteLiteral("\r\n");
|
||||
#nullable restore
|
||||
#line (3,3)-(5,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
#line (3,3)-(8,1) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
|
||||
var count = "1";
|
||||
var alive = true;
|
||||
var obj = new { age = (object)1 };
|
||||
var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
@ -62,7 +65,7 @@ namespace AspNetCore
|
|||
__tagHelperExecutionContext.Add(__InputTagHelper);
|
||||
__InputTagHelper.AgeProp =
|
||||
#nullable restore
|
||||
#line (6,13)-(6,36) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
#line (9,13)-(9,36) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
Convert.ToInt32(@count)
|
||||
|
||||
#line default
|
||||
|
@ -70,6 +73,76 @@ Convert.ToInt32(@count)
|
|||
#nullable disable
|
||||
;
|
||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __InputTagHelper.AgeProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
__InputTagHelper.AliveProp =
|
||||
#nullable restore
|
||||
#line (9,45)-(9,52) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
!@alive
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
;
|
||||
__tagHelperExecutionContext.AddTagHelperAttribute("alive", __InputTagHelper.AliveProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||
{
|
||||
await __tagHelperExecutionContext.SetOutputContentAsync();
|
||||
}
|
||||
Write(__tagHelperExecutionContext.Output);
|
||||
__tagHelperExecutionContext = __tagHelperScopeManager.End();
|
||||
WriteLiteral("\r\n");
|
||||
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
|
||||
}
|
||||
);
|
||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||
__tagHelperExecutionContext.Add(__InputTagHelper);
|
||||
__InputTagHelper.AgeProp =
|
||||
#nullable restore
|
||||
#line (10,13)-(10,26) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
(int)@obj.age
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
;
|
||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __InputTagHelper.AgeProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
__InputTagHelper.TagProp =
|
||||
#nullable restore
|
||||
#line (10,33)-(10,52) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
new { @params = 1 }
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
;
|
||||
__tagHelperExecutionContext.AddTagHelperAttribute("tag", __InputTagHelper.TagProp, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
|
||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||
{
|
||||
await __tagHelperExecutionContext.SetOutputContentAsync();
|
||||
}
|
||||
Write(__tagHelperExecutionContext.Output);
|
||||
__tagHelperExecutionContext = __tagHelperScopeManager.End();
|
||||
WriteLiteral("\r\n");
|
||||
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
|
||||
}
|
||||
);
|
||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||
__tagHelperExecutionContext.Add(__InputTagHelper);
|
||||
if (__InputTagHelper.DictionaryOfBoolAndStringTupleProperty == null)
|
||||
{
|
||||
throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("tuple-prefix-test", "InputTagHelper", "DictionaryOfBoolAndStringTupleProperty"));
|
||||
}
|
||||
__InputTagHelper.DictionaryOfBoolAndStringTupleProperty["test"] =
|
||||
#nullable restore
|
||||
#line (11,27)-(11,151) "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml"
|
||||
(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
#nullable disable
|
||||
;
|
||||
__tagHelperExecutionContext.AddTagHelperAttribute("tuple-prefix-test", __InputTagHelper.DictionaryOfBoolAndStringTupleProperty["test"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
|
||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
// TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedIdentifier.cshtml(7,41): error CS0234: The type or namespace name 'List<>' does not exist in the namespace 'System' (are you missing an assembly reference?)
|
||||
// var item = new { Items = new System.List<string>() { "one", "two" } };
|
||||
Diagnostic(ErrorCode.ERR_DottedTypeNameNotFoundInNS, "List<string>").WithArguments("List<>", "System").WithLocation(7, 41)
|
|
@ -17,16 +17,36 @@
|
|||
MethodDeclaration - - public async override - global::System.Threading.Tasks.Task - ExecuteAsync
|
||||
HtmlContent - (33:1,0 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (33:1,0 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
CSharpCode - (37:2,2 [24] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (37:2,2 [24] EscapedIdentifier.cshtml) - CSharp - \n var count = "1";\n
|
||||
TagHelper - (64:5,0 [39] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
CSharpCode - (37:2,2 [163] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (37:2,2 [163] EscapedIdentifier.cshtml) - CSharp - \n var count = "1";\n var alive = true;\n var obj = new { age = (object)1 };\n var item = new { Items = new System.List<string>() { "one", "two" } };\n
|
||||
TagHelper - (203:8,0 [55] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (76:5,12 [23] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (76:5,12 [23] EscapedIdentifier.cshtml) - CSharp - Convert.ToInt32(@count)
|
||||
DefaultTagHelperProperty - (215:8,12 [23] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (215:8,12 [23] EscapedIdentifier.cshtml) - CSharp - Convert.ToInt32(@count)
|
||||
DefaultTagHelperProperty - (247:8,44 [7] EscapedIdentifier.cshtml) - alive - bool InputTagHelper.AliveProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (247:8,44 [7] EscapedIdentifier.cshtml) - CSharp - !@alive
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (103:5,39 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (103:5,39 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
HtmlContent - (258:8,55 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (258:8,55 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
TagHelper - (260:9,0 [55] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (272:9,12 [13] EscapedIdentifier.cshtml) - age - int InputTagHelper.AgeProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (272:9,12 [13] EscapedIdentifier.cshtml) - CSharp - (int)@obj.age
|
||||
DefaultTagHelperProperty - (292:9,32 [19] EscapedIdentifier.cshtml) - tag - object InputTagHelper.TagProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||
LazyIntermediateToken - (292:9,32 [19] EscapedIdentifier.cshtml) - CSharp - new { @params = 1 }
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (315:9,55 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (315:9,55 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
TagHelper - (317:10,0 [154] EscapedIdentifier.cshtml) - input - TagMode.SelfClosing
|
||||
DefaultTagHelperBody -
|
||||
DefaultTagHelperCreate - - InputTagHelper
|
||||
DefaultTagHelperProperty - (343:10,26 [124] EscapedIdentifier.cshtml) - tuple-prefix-test - System.Collections.Generic.IDictionary<System.String, (System.Boolean, System.String)> InputTagHelper.DictionaryOfBoolAndStringTupleProperty - HtmlAttributeValueStyle.SingleQuotes
|
||||
LazyIntermediateToken - (343:10,26 [124] EscapedIdentifier.cshtml) - CSharp - (@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))
|
||||
DefaultTagHelperExecute -
|
||||
HtmlContent - (471:10,154 [2] EscapedIdentifier.cshtml)
|
||||
LazyIntermediateToken - (471:10,154 [2] EscapedIdentifier.cshtml) - Html - \n
|
||||
Inject -
|
||||
Inject -
|
||||
Inject -
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [61] )
|
||||
Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [31] )
|
||||
MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [31] )
|
||||
Code span at (2:0,2 [28] ) - Parent: Statement block at (0:0,0 [31] )
|
||||
MetaCode span at (30:2,0 [1] ) - Parent: Statement block at (0:0,0 [31] )
|
||||
Markup span at (31:2,1 [2] ) - Parent: Markup block at (0:0,0 [61] )
|
||||
Code span at (48:3,15 [9] ) - Parent: Tag block at (33:3,0 [28] )
|
|
@ -0,0 +1,54 @@
|
|||
RazorDocument - [0..61)::61 - [@{ LF var isAlive = true;LF}LF<person alive="!@isAlive" />]
|
||||
MarkupBlock - [0..61)::61
|
||||
MarkupTextLiteral - [0..0)::0 - [] - Gen<Markup>
|
||||
Marker;[];
|
||||
CSharpCodeBlock - [0..31)::31
|
||||
CSharpStatement - [0..31)::31
|
||||
CSharpTransition - [0..1)::1 - Gen<None>
|
||||
Transition;[@];
|
||||
CSharpStatementBody - [1..31)::30
|
||||
RazorMetaCode - [1..2)::1 - Gen<None>
|
||||
LeftBrace;[{];
|
||||
CSharpCodeBlock - [2..30)::28
|
||||
CSharpStatementLiteral - [2..30)::28 - [ LF var isAlive = true;LF] - Gen<Stmt>
|
||||
Whitespace;[ ];
|
||||
NewLine;[LF];
|
||||
Whitespace;[ ];
|
||||
Identifier;[var];
|
||||
Whitespace;[ ];
|
||||
Identifier;[isAlive];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
Keyword;[true];
|
||||
Semicolon;[;];
|
||||
NewLine;[LF];
|
||||
RazorMetaCode - [30..31)::1 - Gen<None>
|
||||
RightBrace;[}];
|
||||
MarkupEphemeralTextLiteral - [31..33)::2 - [LF] - Gen<None>
|
||||
NewLine;[LF];
|
||||
MarkupTagHelperElement - [33..61)::28 - person[SelfClosing] - PersonTagHelper
|
||||
MarkupTagHelperStartTag - [33..61)::28 - [<person alive="!@isAlive" />] - Gen<Markup>
|
||||
OpenAngle;[<];
|
||||
Text;[person];
|
||||
MarkupTagHelperAttribute - [40..58)::18 - alive - DoubleQuotes - Bound - [ alive="!@isAlive"]
|
||||
MarkupTextLiteral - [40..41)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
MarkupTextLiteral - [41..46)::5 - [alive] - Gen<Markup>
|
||||
Text;[alive];
|
||||
Equals;[=];
|
||||
MarkupTextLiteral - [47..48)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupTagHelperAttributeValue - [48..57)::9
|
||||
CSharpExpressionLiteral - [48..57)::9 - [!@isAlive] - Gen<None>
|
||||
Bang;[!];
|
||||
Transition;[@];
|
||||
Identifier;[isAlive];
|
||||
MarkupTextLiteral - [57..58)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupMiscAttributeContent - [58..59)::1
|
||||
MarkupTextLiteral - [58..59)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
ForwardSlash;[/];
|
||||
CloseAngle;[>];
|
||||
EndOfFile;[];
|
|
@ -0,0 +1 @@
|
|||
TagHelper span at (33:3,0 [28] ) - PersonTagHelper
|
|
@ -0,0 +1,7 @@
|
|||
Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [80] )
|
||||
Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
Code span at (2:0,2 [44] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
MetaCode span at (46:2,0 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
Markup span at (47:2,1 [2] ) - Parent: Markup block at (0:0,0 [80] )
|
||||
Code span at (62:3,13 [14] ) - Parent: Tag block at (49:3,0 [31] )
|
|
@ -0,0 +1,69 @@
|
|||
RazorDocument - [0..80)::80 - [@{ LF var obj = new { Prop = (object)1 };LF}LF<person age="(int)@obj.Prop" />]
|
||||
MarkupBlock - [0..80)::80
|
||||
MarkupTextLiteral - [0..0)::0 - [] - Gen<Markup>
|
||||
Marker;[];
|
||||
CSharpCodeBlock - [0..47)::47
|
||||
CSharpStatement - [0..47)::47
|
||||
CSharpTransition - [0..1)::1 - Gen<None>
|
||||
Transition;[@];
|
||||
CSharpStatementBody - [1..47)::46
|
||||
RazorMetaCode - [1..2)::1 - Gen<None>
|
||||
LeftBrace;[{];
|
||||
CSharpCodeBlock - [2..46)::44
|
||||
CSharpStatementLiteral - [2..46)::44 - [ LF var obj = new { Prop = (object)1 };LF] - Gen<Stmt>
|
||||
Whitespace;[ ];
|
||||
NewLine;[LF];
|
||||
Whitespace;[ ];
|
||||
Identifier;[var];
|
||||
Whitespace;[ ];
|
||||
Identifier;[obj];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
Keyword;[new];
|
||||
Whitespace;[ ];
|
||||
LeftBrace;[{];
|
||||
Whitespace;[ ];
|
||||
Identifier;[Prop];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
LeftParenthesis;[(];
|
||||
Keyword;[object];
|
||||
RightParenthesis;[)];
|
||||
IntegerLiteral;[1];
|
||||
Whitespace;[ ];
|
||||
RightBrace;[}];
|
||||
Semicolon;[;];
|
||||
NewLine;[LF];
|
||||
RazorMetaCode - [46..47)::1 - Gen<None>
|
||||
RightBrace;[}];
|
||||
MarkupEphemeralTextLiteral - [47..49)::2 - [LF] - Gen<None>
|
||||
NewLine;[LF];
|
||||
MarkupTagHelperElement - [49..80)::31 - person[SelfClosing] - PersonTagHelper
|
||||
MarkupTagHelperStartTag - [49..80)::31 - [<person age="(int)@obj.Prop" />] - Gen<Markup>
|
||||
OpenAngle;[<];
|
||||
Text;[person];
|
||||
MarkupTagHelperAttribute - [56..77)::21 - age - DoubleQuotes - Bound - [ age="(int)@obj.Prop"]
|
||||
MarkupTextLiteral - [56..57)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
MarkupTextLiteral - [57..60)::3 - [age] - Gen<Markup>
|
||||
Text;[age];
|
||||
Equals;[=];
|
||||
MarkupTextLiteral - [61..62)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupTagHelperAttributeValue - [62..76)::14
|
||||
CSharpExpressionLiteral - [62..76)::14 - [(int)@obj.Prop] - Gen<None>
|
||||
Text;[(int)];
|
||||
Transition;[@];
|
||||
Identifier;[obj];
|
||||
Dot;[.];
|
||||
Identifier;[Prop];
|
||||
MarkupTextLiteral - [76..77)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupMiscAttributeContent - [77..78)::1
|
||||
MarkupTextLiteral - [77..78)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
ForwardSlash;[/];
|
||||
CloseAngle;[>];
|
||||
EndOfFile;[];
|
|
@ -0,0 +1 @@
|
|||
TagHelper span at (49:3,0 [31] ) - PersonTagHelper
|
|
@ -0,0 +1,7 @@
|
|||
Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [85] )
|
||||
Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
Code span at (2:0,2 [44] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
MetaCode span at (46:2,0 [1] ) - Parent: Statement block at (0:0,0 [47] )
|
||||
Markup span at (47:2,1 [2] ) - Parent: Markup block at (0:0,0 [85] )
|
||||
Code span at (62:3,13 [19] ) - Parent: Tag block at (49:3,0 [36] )
|
|
@ -0,0 +1,76 @@
|
|||
RazorDocument - [0..85)::85 - [@{ LF var obj = new { Prop = (object)1 };LF}LF<person tag="new { @params = 1 }" />]
|
||||
MarkupBlock - [0..85)::85
|
||||
MarkupTextLiteral - [0..0)::0 - [] - Gen<Markup>
|
||||
Marker;[];
|
||||
CSharpCodeBlock - [0..47)::47
|
||||
CSharpStatement - [0..47)::47
|
||||
CSharpTransition - [0..1)::1 - Gen<None>
|
||||
Transition;[@];
|
||||
CSharpStatementBody - [1..47)::46
|
||||
RazorMetaCode - [1..2)::1 - Gen<None>
|
||||
LeftBrace;[{];
|
||||
CSharpCodeBlock - [2..46)::44
|
||||
CSharpStatementLiteral - [2..46)::44 - [ LF var obj = new { Prop = (object)1 };LF] - Gen<Stmt>
|
||||
Whitespace;[ ];
|
||||
NewLine;[LF];
|
||||
Whitespace;[ ];
|
||||
Identifier;[var];
|
||||
Whitespace;[ ];
|
||||
Identifier;[obj];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
Keyword;[new];
|
||||
Whitespace;[ ];
|
||||
LeftBrace;[{];
|
||||
Whitespace;[ ];
|
||||
Identifier;[Prop];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
LeftParenthesis;[(];
|
||||
Keyword;[object];
|
||||
RightParenthesis;[)];
|
||||
IntegerLiteral;[1];
|
||||
Whitespace;[ ];
|
||||
RightBrace;[}];
|
||||
Semicolon;[;];
|
||||
NewLine;[LF];
|
||||
RazorMetaCode - [46..47)::1 - Gen<None>
|
||||
RightBrace;[}];
|
||||
MarkupEphemeralTextLiteral - [47..49)::2 - [LF] - Gen<None>
|
||||
NewLine;[LF];
|
||||
MarkupTagHelperElement - [49..85)::36 - person[SelfClosing] - PersonTagHelper
|
||||
MarkupTagHelperStartTag - [49..85)::36 - [<person tag="new { @params = 1 }" />] - Gen<Markup>
|
||||
OpenAngle;[<];
|
||||
Text;[person];
|
||||
MarkupTagHelperAttribute - [56..82)::26 - tag - DoubleQuotes - Bound - [ tag="new { @params = 1 }"]
|
||||
MarkupTextLiteral - [56..57)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
MarkupTextLiteral - [57..60)::3 - [tag] - Gen<Markup>
|
||||
Text;[tag];
|
||||
Equals;[=];
|
||||
MarkupTextLiteral - [61..62)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupTagHelperAttributeValue - [62..81)::19
|
||||
CSharpExpressionLiteral - [62..81)::19 - [new { @params = 1 }] - Gen<None>
|
||||
Text;[new];
|
||||
Whitespace;[ ];
|
||||
Text;[{];
|
||||
Whitespace;[ ];
|
||||
Transition;[@];
|
||||
Keyword;[params];
|
||||
Whitespace;[ ];
|
||||
Equals;[=];
|
||||
Whitespace;[ ];
|
||||
Text;[1];
|
||||
Whitespace;[ ];
|
||||
Text;[}];
|
||||
MarkupTextLiteral - [81..82)::1 - ["] - Gen<Markup>
|
||||
DoubleQuote;["];
|
||||
MarkupMiscAttributeContent - [82..83)::1
|
||||
MarkupTextLiteral - [82..83)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
ForwardSlash;[/];
|
||||
CloseAngle;[>];
|
||||
EndOfFile;[];
|
|
@ -0,0 +1 @@
|
|||
TagHelper span at (49:3,0 [36] ) - PersonTagHelper
|
|
@ -0,0 +1,7 @@
|
|||
Markup span at (0:0,0 [0] ) - Parent: Markup block at (0:0,0 [238] )
|
||||
Transition span at (0:0,0 [1] ) - Parent: Statement block at (0:0,0 [82] )
|
||||
MetaCode span at (1:0,1 [1] ) - Parent: Statement block at (0:0,0 [82] )
|
||||
Code span at (2:0,2 [79] ) - Parent: Statement block at (0:0,0 [82] )
|
||||
MetaCode span at (81:2,0 [1] ) - Parent: Statement block at (0:0,0 [82] )
|
||||
Markup span at (82:2,1 [2] ) - Parent: Markup block at (0:0,0 [238] )
|
||||
Code span at (110:3,26 [124] ) - Parent: Tag block at (84:3,0 [154] )
|
|
@ -0,0 +1,120 @@
|
|||
RazorDocument - [0..238)::238 - [@{ LF var item = new { Items = new System.List<string>() { "one", "two" } };LF}LF<input tuple-prefix-test='(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))' />]
|
||||
MarkupBlock - [0..238)::238
|
||||
MarkupTextLiteral - [0..0)::0 - [] - Gen<Markup>
|
||||
Marker;[];
|
||||
CSharpCodeBlock - [0..82)::82
|
||||
CSharpStatement - [0..82)::82
|
||||
CSharpTransition - [0..1)::1 - Gen<None>
|
||||
Transition;[@];
|
||||
CSharpStatementBody - [1..82)::81
|
||||
RazorMetaCode - [1..2)::1 - Gen<None>
|
||||
LeftBrace;[{];
|
||||
CSharpCodeBlock - [2..81)::79
|
||||
CSharpStatementLiteral - [2..81)::79 - [ LF var item = new { Items = new System.List<string>() { "one", "two" } };LF] - Gen<Stmt>
|
||||
Whitespace;[ ];
|
||||
NewLine;[LF];
|
||||
Whitespace;[ ];
|
||||
Identifier;[var];
|
||||
Whitespace;[ ];
|
||||
Identifier;[item];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
Keyword;[new];
|
||||
Whitespace;[ ];
|
||||
LeftBrace;[{];
|
||||
Whitespace;[ ];
|
||||
Identifier;[Items];
|
||||
Whitespace;[ ];
|
||||
Assign;[=];
|
||||
Whitespace;[ ];
|
||||
Keyword;[new];
|
||||
Whitespace;[ ];
|
||||
Identifier;[System];
|
||||
Dot;[.];
|
||||
Identifier;[List];
|
||||
LessThan;[<];
|
||||
Keyword;[string];
|
||||
GreaterThan;[>];
|
||||
LeftParenthesis;[(];
|
||||
RightParenthesis;[)];
|
||||
Whitespace;[ ];
|
||||
LeftBrace;[{];
|
||||
Whitespace;[ ];
|
||||
StringLiteral;["one"];
|
||||
Comma;[,];
|
||||
Whitespace;[ ];
|
||||
StringLiteral;["two"];
|
||||
Whitespace;[ ];
|
||||
RightBrace;[}];
|
||||
Whitespace;[ ];
|
||||
RightBrace;[}];
|
||||
Semicolon;[;];
|
||||
NewLine;[LF];
|
||||
RazorMetaCode - [81..82)::1 - Gen<None>
|
||||
RightBrace;[}];
|
||||
MarkupEphemeralTextLiteral - [82..84)::2 - [LF] - Gen<None>
|
||||
NewLine;[LF];
|
||||
MarkupTagHelperElement - [84..238)::154 - input[SelfClosing] - InputTagHelper
|
||||
MarkupTagHelperStartTag - [84..238)::154 - [<input tuple-prefix-test='(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))' />] - Gen<Markup>
|
||||
OpenAngle;[<];
|
||||
Text;[input];
|
||||
MarkupTagHelperAttribute - [90..235)::145 - tuple-prefix-test - SingleQuotes - Bound - [ tuple-prefix-test='(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))']
|
||||
MarkupTextLiteral - [90..91)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
MarkupTextLiteral - [91..108)::17 - [tuple-prefix-test] - Gen<Markup>
|
||||
Text;[tuple-prefix-test];
|
||||
Equals;[=];
|
||||
MarkupTextLiteral - [109..110)::1 - ['] - Gen<Markup>
|
||||
SingleQuote;['];
|
||||
MarkupTagHelperAttributeValue - [110..234)::124
|
||||
CSharpExpressionLiteral - [110..234)::124 - [(@item. Items.Where(i=>i.Contains("one")). Count()>0, @item. Items.FirstOrDefault(i=>i.Contains("one"))?. Replace("one",""))] - Gen<None>
|
||||
Text;[(];
|
||||
Transition;[@];
|
||||
Identifier;[item];
|
||||
Text;[.];
|
||||
Whitespace;[ ];
|
||||
Text;[Items.Where(i];
|
||||
Equals;[=];
|
||||
CloseAngle;[>];
|
||||
Text;[i.Contains(];
|
||||
DoubleQuote;["];
|
||||
Text;[one];
|
||||
DoubleQuote;["];
|
||||
Text;[)).];
|
||||
Whitespace;[ ];
|
||||
Text;[Count()];
|
||||
CloseAngle;[>];
|
||||
Text;[0,];
|
||||
Whitespace;[ ];
|
||||
Transition;[@];
|
||||
Identifier;[item];
|
||||
Text;[.];
|
||||
Whitespace;[ ];
|
||||
Text;[Items.FirstOrDefault(i];
|
||||
Equals;[=];
|
||||
CloseAngle;[>];
|
||||
Text;[i.Contains(];
|
||||
DoubleQuote;["];
|
||||
Text;[one];
|
||||
DoubleQuote;["];
|
||||
Text;[))];
|
||||
QuestionMark;[?];
|
||||
Text;[.];
|
||||
Whitespace;[ ];
|
||||
Text;[Replace(];
|
||||
DoubleQuote;["];
|
||||
Text;[one];
|
||||
DoubleQuote;["];
|
||||
Text;[,];
|
||||
DoubleQuote;["];
|
||||
DoubleQuote;["];
|
||||
Text;[))];
|
||||
MarkupTextLiteral - [234..235)::1 - ['] - Gen<Markup>
|
||||
SingleQuote;['];
|
||||
MarkupMiscAttributeContent - [235..236)::1
|
||||
MarkupTextLiteral - [235..236)::1 - [ ] - Gen<Markup>
|
||||
Whitespace;[ ];
|
||||
ForwardSlash;[/];
|
||||
CloseAngle;[>];
|
||||
EndOfFile;[];
|
|
@ -0,0 +1 @@
|
|||
TagHelper span at (84:3,0 [154] ) - InputTagHelper
|
Загрузка…
Ссылка в новой задаче