WriteTagHelper_InputData
{
GetTagHelperOutput(
tagName: "p",
- attributes: new TagHelperAttributeList() { { "test", "testVal" } },
+ attributes: new TagHelperAttributeList()
+ {
+ { new TagHelperAttribute("test", "testVal", HtmlAttributeValueStyle.SingleQuotes) }
+ },
tagMode: TagMode.StartTagOnly,
preElement: null,
preContent: null,
content: "Hello World!",
postContent: null,
postElement: null),
- ""
+ "
"
},
{
GetTagHelperOutput(
@@ -777,6 +796,21 @@ public static TheoryData WriteTagHelper_InputData
postElement: null),
"Before"
},
+ {
+ GetTagHelperOutput(
+ tagName: string.Empty,
+ attributes: new TagHelperAttributeList
+ {
+ { new TagHelperAttribute("test", "testVal", HtmlAttributeValueStyle.SingleQuotes) }
+ },
+ tagMode: TagMode.StartTagOnly,
+ preElement: "Before",
+ preContent: null,
+ content: null,
+ postContent: null,
+ postElement: null),
+ "Before"
+ },
{
GetTagHelperOutput(
tagName: "custom",
diff --git a/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingTest.cs b/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingTest.cs
index 01a18aa0e..064719201 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingTest.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingTest.cs
@@ -1307,12 +1307,20 @@ public static TheoryData DesignTimeTagHelperTestData
generatedLineIndex: 36,
generatedCharacterOffsetIndex: 42,
contentLength: 4),
+ BuildLineMapping(
+ documentAbsoluteIndex: 220,
+ documentLineIndex: 5,
+ documentCharacterOffsetIndex: 34,
+ generatedAbsoluteIndex: 2234,
+ generatedLineIndex: 45,
+ generatedCharacterOffsetIndex: 42,
+ contentLength: 4),
BuildLineMapping(
documentAbsoluteIndex: 41,
documentLineIndex: 2,
documentCharacterOffsetIndex: 8,
- generatedAbsoluteIndex: 1962,
- generatedLineIndex: 42,
+ generatedAbsoluteIndex: 2447,
+ generatedLineIndex: 51,
generatedCharacterOffsetIndex: 33,
contentLength: 1),
}
diff --git a/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingUnitTest.cs b/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingUnitTest.cs
index 63b088fdc..e69b43568 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingUnitTest.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/CodeGenerators/CSharpTagHelperRenderingUnitTest.cs
@@ -241,14 +241,14 @@ private static TagHelperChunk CreateTagHelperChunk(string tagName, IEnumerable>(),
+ attributes: new List(),
descriptors: tagHelperDescriptors)
{
Association = new TagHelperBlock(
new TagHelperBlockBuilder(
tagName,
tagMode: TagMode.StartTagAndEndTag,
- attributes: new List>(),
+ attributes: new List(),
children: Enumerable.Empty())),
Children = new List(),
};
diff --git a/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockFactory.cs b/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockFactory.cs
index fa702bd05..8d65d4dbf 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockFactory.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockFactory.cs
@@ -69,7 +69,7 @@ public Block TagHelperBlock(
var builder = new TagHelperBlockBuilder(
tagName,
tagMode,
- attributes: new List>(),
+ attributes: new List(),
children: children)
{
Start = start,
diff --git a/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockTypes.cs b/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockTypes.cs
index 62bfbaa7a..c64aeffd5 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockTypes.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/Framework/BlockTypes.cs
@@ -132,18 +132,18 @@ public MarkupBlock(params SyntaxTreeNode[] children)
public class MarkupTagHelperBlock : TagHelperBlock
{
public MarkupTagHelperBlock(string tagName)
- : this(tagName, tagMode: TagMode.StartTagAndEndTag, attributes: new List>())
+ : this(tagName, tagMode: TagMode.StartTagAndEndTag, attributes: new List())
{
}
public MarkupTagHelperBlock(string tagName, TagMode tagMode)
- : this(tagName, tagMode, new List>())
+ : this(tagName, tagMode, new List())
{
}
public MarkupTagHelperBlock(
string tagName,
- IList> attributes)
+ IList attributes)
: this(tagName, TagMode.StartTagAndEndTag, attributes, children: new SyntaxTreeNode[0])
{
}
@@ -151,7 +151,7 @@ public MarkupTagHelperBlock(
public MarkupTagHelperBlock(
string tagName,
TagMode tagMode,
- IList> attributes)
+ IList attributes)
: this(tagName, tagMode, attributes, new SyntaxTreeNode[0])
{
}
@@ -160,19 +160,19 @@ public MarkupTagHelperBlock(string tagName, params SyntaxTreeNode[] children)
: this(
tagName,
TagMode.StartTagAndEndTag,
- attributes: new List>(),
+ attributes: new List(),
children: children)
{
}
public MarkupTagHelperBlock(string tagName, TagMode tagMode, params SyntaxTreeNode[] children)
- : this(tagName, tagMode, new List>(), children)
+ : this(tagName, tagMode, new List(), children)
{
}
public MarkupTagHelperBlock(
string tagName,
- IList> attributes,
+ IList attributes,
params SyntaxTreeNode[] children)
: base(new TagHelperBlockBuilder(
tagName,
@@ -185,7 +185,7 @@ public MarkupTagHelperBlock(
public MarkupTagHelperBlock(
string tagName,
TagMode tagMode,
- IList> attributes,
+ IList attributes,
params SyntaxTreeNode[] children)
: base(new TagHelperBlockBuilder(tagName, tagMode, attributes, children))
{
diff --git a/test/Microsoft.AspNetCore.Razor.Test/Framework/ParserTestBase.cs b/test/Microsoft.AspNetCore.Razor.Test/Framework/ParserTestBase.cs
index 8c05f4381..eb83a9926 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/Framework/ParserTestBase.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/Framework/ParserTestBase.cs
@@ -324,24 +324,30 @@ private static void EvaluateSyntaxTreeNode(ErrorCollector collector, SyntaxTreeN
}
}
- private static void EvaluateTagHelperAttribute(ErrorCollector collector,
- KeyValuePair actual,
- KeyValuePair expected)
+ private static void EvaluateTagHelperAttribute(
+ ErrorCollector collector,
+ TagHelperAttributeNode actual,
+ TagHelperAttributeNode expected)
{
- if (actual.Key != expected.Key)
+ if (actual.Name != expected.Name)
{
- collector.AddError("{0} - FAILED :: Attribute names do not match", expected.Key);
+ collector.AddError("{0} - FAILED :: Attribute names do not match", expected.Name);
}
else
{
- collector.AddMessage("{0} - PASSED :: Attribute names match", expected.Key);
+ collector.AddMessage("{0} - PASSED :: Attribute names match", expected.Name);
}
- if (actual.Value == null && expected.Value == null)
+ if (actual.ValueStyle != expected.ValueStyle)
{
- collector.AddMessage("{0} - PASSED :: Minimized attribute values match", expected.Key);
+ collector.AddError("{0} - FAILED :: Attribute value styles do not match", expected.ValueStyle.ToString());
}
else
+ {
+ collector.AddMessage("{0} - PASSED :: Attribute value style match", expected.ValueStyle);
+ }
+
+ if (actual.ValueStyle != HtmlAttributeValueStyle.Minimized)
{
EvaluateSyntaxTreeNode(collector, actual.Value, expected.Value);
}
@@ -435,7 +441,7 @@ private static void EvaluateTagHelperBlock(ErrorCollector collector, TagHelperBl
}
while (actualAttributes.MoveNext())
{
- collector.AddError("End of Attributes - FAILED :: Found Attribute: {0}", actualAttributes.Current.Key);
+ collector.AddError("End of Attributes - FAILED :: Found Attribute: {0}", actualAttributes.Current.Name);
}
}
}
diff --git a/test/Microsoft.AspNetCore.Razor.Test/TagHelpers/TagHelperBlockRewriterTest.cs b/test/Microsoft.AspNetCore.Razor.Test/TagHelpers/TagHelperBlockRewriterTest.cs
index e3359b911..9a159fe25 100644
--- a/test/Microsoft.AspNetCore.Razor.Test/TagHelpers/TagHelperBlockRewriterTest.cs
+++ b/test/Microsoft.AspNetCore.Razor.Test/TagHelpers/TagHelperBlockRewriterTest.cs
@@ -8,6 +8,7 @@
using Microsoft.AspNetCore.Razor.Chunks.Generators;
using Microsoft.AspNetCore.Razor.Parser;
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
+using Microsoft.AspNetCore.Razor.Parser.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Test.TagHelpers;
@@ -30,32 +31,33 @@ public static TheoryData SymbolBoundAttributeData
"",
new MarkupBlock(
new MarkupTagHelperBlock("ul",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair("[item]", factory.CodeMarkup("items"))
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode("[item]", factory.CodeMarkup("items"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
"",
new MarkupBlock(
new MarkupTagHelperBlock("ul",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair("[(item)]", factory.CodeMarkup("items"))
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode("[(item)]", factory.CodeMarkup("items"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
"",
new MarkupBlock(
new MarkupTagHelperBlock("button",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair(
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode(
"(click)",
- factory.CodeMarkup("doSomething()"))
+ factory.CodeMarkup("doSomething()"),
+ HtmlAttributeValueStyle.SingleQuotes)
},
children: factory.Markup("Click Me")))
},
@@ -63,12 +65,13 @@ public static TheoryData SymbolBoundAttributeData
"",
new MarkupBlock(
new MarkupTagHelperBlock("button",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair(
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode(
"(^click)",
- factory.CodeMarkup("doSomething()"))
+ factory.CodeMarkup("doSomething()"),
+ HtmlAttributeValueStyle.SingleQuotes)
},
children: factory.Markup("Click Me")))
},
@@ -76,30 +79,33 @@ public static TheoryData SymbolBoundAttributeData
"",
new MarkupBlock(
new MarkupTagHelperBlock("template",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair("*something", factory.Markup("value"))
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode(
+ "*something",
+ factory.Markup("value"),
+ HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
"",
new MarkupBlock(
new MarkupTagHelperBlock("div",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair("#localminimized", null)
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode("#localminimized", null, HtmlAttributeValueStyle.Minimized)
}))
},
{
"",
new MarkupBlock(
new MarkupTagHelperBlock("div",
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("bound", null),
- new KeyValuePair("#local", factory.Markup("value"))
+ new TagHelperAttributeNode("bound", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode("#local", factory.Markup("value"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
};
@@ -186,9 +192,9 @@ public static TheoryData WithoutEndTagElementData
new MarkupTagHelperBlock(
"input",
TagMode.StartTagOnly,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("type", factory.Markup("text"))
+ new TagHelperAttributeNode("type", factory.Markup("text"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
@@ -203,9 +209,9 @@ public static TheoryData WithoutEndTagElementData
new MarkupTagHelperBlock(
"input",
TagMode.StartTagOnly,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("type", factory.Markup("text"))
+ new TagHelperAttributeNode("type", factory.Markup("text"), HtmlAttributeValueStyle.SingleQuotes)
}),
new MarkupTagHelperBlock("input", TagMode.StartTagOnly))
},
@@ -272,9 +278,9 @@ public static TheoryData TagStructureCompatibilityData
new MarkupTagHelperBlock(
"input",
TagMode.StartTagOnly,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("type", factory.Markup("text"))
+ new TagHelperAttributeNode("type", factory.Markup("text"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
@@ -293,9 +299,9 @@ public static TheoryData TagStructureCompatibilityData
new MarkupTagHelperBlock(
"input",
TagMode.StartTagAndEndTag,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("type", factory.Markup("text"))
+ new TagHelperAttributeNode("type", factory.Markup("text"), HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
@@ -380,11 +386,12 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"bar",
- new MarkupBlock(factory.Markup("false"), factory.Markup(" ")))
+ new MarkupBlock(factory.Markup("false"), factory.Markup(" ")),
+ HtmlAttributeValueStyle.SingleQuotes)
})),
new []
{
@@ -440,13 +448,14 @@ public static TheoryData MalformedTagHelperAt
">
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"bar",
new MarkupBlock(
factory.Markup("false"),
- factory.Markup(" MalformedTagHelperAt
">
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"bar",
- factory.Markup("false"))
+ factory.Markup("false"),
+ HtmlAttributeValueStyle.DoubleQuotes)
})),
new []
{
@@ -490,9 +500,9 @@ public static TheoryData MalformedTagHelperAt
">
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"bar",
factory.Markup("false'"))
})),
@@ -512,9 +522,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"bar",
new MarkupBlock(
factory.Markup("false'"),
@@ -536,10 +546,10 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("foo", null),
- new KeyValuePair("bar", null)
+ new TagHelperAttributeNode("foo", null, HtmlAttributeValueStyle.Minimized),
+ new TagHelperAttributeNode("bar", null, HtmlAttributeValueStyle.Minimized)
},
new MarkupTagHelperBlock("strong"))),
new []
@@ -562,9 +572,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("class", factory.Markup("btn"))
+ new TagHelperAttributeNode("class", factory.Markup("btn"))
})),
new []
{
@@ -578,9 +588,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("class", factory.Markup("btn"))
+ new TagHelperAttributeNode("class", factory.Markup("btn"))
})),
new []
{
@@ -594,12 +604,12 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"class",
new MarkupBlock(factory.Markup("btn"), factory.Markup(" bar="))),
- new KeyValuePair("foo", null)
+ new TagHelperAttributeNode("foo", null, HtmlAttributeValueStyle.Minimized)
},
new MarkupTagHelperBlock("strong"))),
new []
@@ -622,12 +632,12 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"class",
new MarkupBlock(factory.Markup("btn"), factory.Markup(" bar="))),
- new KeyValuePair("foo", null),
+ new TagHelperAttributeNode("foo", null, HtmlAttributeValueStyle.Minimized),
})),
new RazorError[0]
},
@@ -657,9 +667,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"class",
new MarkupBlock(
new MarkupBlock(
@@ -672,7 +682,8 @@ public static TheoryData MalformedTagHelperAt
factory.CodeTransition(),
factory.Code("DateTime.Now")
.AsImplicitExpression(CSharpCodeParser.DefaultKeywords)
- .Accepts(AcceptedCharacters.NonWhiteSpace)))))
+ .Accepts(AcceptedCharacters.NonWhiteSpace)))),
+ HtmlAttributeValueStyle.DoubleQuotes)
})),
new []
{
@@ -686,9 +697,9 @@ public static TheoryData MalformedTagHelperAt
">
+ new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"class",
createInvalidDoBlock(string.Empty))
})),
@@ -711,9 +722,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("class", createInvalidDoBlock("\">
"))
+ new TagHelperAttributeNode("class", createInvalidDoBlock("\">
"))
})),
new []
{
@@ -762,9 +773,9 @@ public static TheoryData MalformedTagHelperAt
"",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("class", factory.Markup("some"))
+ new TagHelperAttributeNode("class", factory.Markup("some"))
})),
new []
{
@@ -972,9 +983,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("age", factory.CodeMarkup("12"))
+ new TagHelperAttributeNode("age", factory.CodeMarkup("12"))
}))
},
{
@@ -982,9 +993,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"birthday",
factory.CodeMarkup("DateTime.Now"))
}))
@@ -994,9 +1005,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"age",
new MarkupBlock(
new MarkupBlock(
@@ -1013,9 +1024,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"age",
new MarkupBlock(
new MarkupBlock(
@@ -1036,9 +1047,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("name", factory.Markup("John"))
+ new TagHelperAttributeNode("name", factory.Markup("John"))
}))
},
{
@@ -1046,9 +1057,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"name",
new MarkupBlock(factory.Markup("Time:"), dateTimeNow))
}))
@@ -1058,9 +1069,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"age",
new MarkupBlock(
factory.CodeMarkup("1"),
@@ -1078,7 +1089,7 @@ public static TheoryData CodeTagHelperAttributesData
.Accepts(AcceptedCharacters.NonWhiteSpace))),
factory.CodeMarkup(" +"),
factory.CodeMarkup(" 2"))),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"birthday",
new MarkupBlock(
factory.CodeMarkup("(bool)"),
@@ -1110,8 +1121,8 @@ public static TheoryData CodeTagHelperAttributesData
factory
.Code("DateTime.Now")
.AsImplicitExpression(CSharpCodeParser.DefaultKeywords)
- .Accepts(AcceptedCharacters.NonWhiteSpace)))
- ))
+ .Accepts(AcceptedCharacters.NonWhiteSpace)))),
+ HtmlAttributeValueStyle.SingleQuotes)
}))
},
{
@@ -1119,13 +1130,13 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("age", factory.CodeMarkup("12")),
- new KeyValuePair(
+ new TagHelperAttributeNode("age", factory.CodeMarkup("12")),
+ new TagHelperAttributeNode(
"birthday",
factory.CodeMarkup("DateTime.Now")),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"name",
new MarkupBlock(factory.Markup("Time:"), dateTimeNow))
}))
@@ -1135,13 +1146,13 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("age", factory.CodeMarkup("12")),
- new KeyValuePair(
+ new TagHelperAttributeNode("age", factory.CodeMarkup("12")),
+ new TagHelperAttributeNode(
"birthday",
factory.CodeMarkup("DateTime.Now")),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"name",
new MarkupBlock(
factory.Markup("Time:"),
@@ -1158,13 +1169,13 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair("age", factory.CodeMarkup("12")),
- new KeyValuePair(
+ new TagHelperAttributeNode("age", factory.CodeMarkup("12")),
+ new TagHelperAttributeNode(
"birthday",
factory.CodeMarkup("DateTime.Now")),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"name",
new MarkupBlock(
new MarkupBlock(
@@ -1180,9 +1191,9 @@ public static TheoryData CodeTagHelperAttributesData
new MarkupBlock(
new MarkupTagHelperBlock("person",
TagMode.SelfClosing,
- attributes: new List>
+ attributes: new List
{
- new KeyValuePair(
+ new TagHelperAttributeNode(
"age",
new MarkupBlock(
new MarkupBlock(
@@ -1207,10 +1218,10 @@ public static TheoryData CodeTagHelperAttributesData
.Accepts(AcceptedCharacters.None)
.As(SpanKind.Code)
.With(new MarkupChunkGenerator()))))),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"birthday",
factory.CodeMarkup("DateTime.Now")),
- new KeyValuePair(
+ new TagHelperAttributeNode(
"name",
new MarkupBlock(factory.Markup("Time:"), dateTimeNow))
}))
@@ -1280,10 +1291,10 @@ public static IEnumerable
",
new MarkupBlock(
new MarkupTagHelperBlock("p",
- new List>
+ new List
{
- new KeyValuePair("class", factory.Markup("foo")),
- new KeyValuePair(
+ new TagHelperAttributeNode("class", factory.Markup("foo")),
+ new TagHelperAttributeNode(
"dynamic",
new MarkupBlock(
new MarkupBlock(
@@ -1296,8 +1307,9 @@ public static IEnumerable
")),
@@ -1353,15 +1365,15 @@ public static IEnumerable