Track `TagHelperAttribute` quotes.

- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`.
- Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now.
- Stopped manually escaping double quotes because we now know how an attribute was originally written.
- Updated tests to account for new attribute format (from kvp).

#705
This commit is contained in:
N. Taylor Mullen 2016-04-25 12:15:20 -07:00
parent 9decaef0e3
commit e14f4b095d
49 changed files with 1348 additions and 1052 deletions

View File

@ -138,34 +138,20 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
_tagHelpers.Add(tagHelper); _tagHelpers.Add(tagHelper);
} }
/// <summary>
/// Tracks the minimized HTML attribute.
/// </summary>
/// <param name="name">The minimized HTML attribute name.</param>
public void AddMinimizedHtmlAttribute(string name)
{
if (name == null)
{
throw new ArgumentNullException(nameof(name));
}
var attribute = new TagHelperAttribute(name);
AddHtmlAttribute(attribute);
}
/// <summary> /// <summary>
/// Tracks the HTML attribute. /// Tracks the HTML attribute.
/// </summary> /// </summary>
/// <param name="name">The HTML attribute name.</param> /// <param name="name">The HTML attribute name.</param>
/// <param name="value">The HTML attribute value.</param> /// <param name="value">The HTML attribute value.</param>
public void AddHtmlAttribute(string name, object value) /// <param name="valueStyle">The value style of the attribute.</param>
public void AddHtmlAttribute(string name, object value, HtmlAttributeValueStyle valueStyle)
{ {
if (name == null) if (name == null)
{ {
throw new ArgumentNullException(nameof(name)); throw new ArgumentNullException(nameof(name));
} }
var attribute = new TagHelperAttribute(name, value); var attribute = new TagHelperAttribute(name, value, valueStyle);
AddHtmlAttribute(attribute); AddHtmlAttribute(attribute);
} }
@ -189,15 +175,16 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
/// </summary> /// </summary>
/// <param name="name">The bound attribute name.</param> /// <param name="name">The bound attribute name.</param>
/// <param name="value">The attribute value.</param> /// <param name="value">The attribute value.</param>
public void AddTagHelperAttribute(string name, object value) /// <param name="valueStyle">The value style of the attribute.</param>
public void AddTagHelperAttribute(string name, object value, HtmlAttributeValueStyle valueStyle)
{ {
if (name == null) if (name == null)
{ {
throw new ArgumentNullException(nameof(name)); throw new ArgumentNullException(nameof(name));
} }
var attribute = new TagHelperAttribute(name, value, valueStyle);
_allAttributes.Add(name, value); _allAttributes.Add(attribute);
} }
/// <summary> /// <summary>

View File

@ -2,6 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.IO;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Html;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Razor.TagHelpers namespace Microsoft.AspNetCore.Razor.TagHelpers
@ -9,39 +12,40 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
/// <summary> /// <summary>
/// An HTML tag helper attribute. /// An HTML tag helper attribute.
/// </summary> /// </summary>
public class TagHelperAttribute public class TagHelperAttribute : IHtmlContentContainer
{ {
/// <summary> /// <summary>
/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>. /// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>.
/// <see cref="Minimized"/> is set to <c>true</c> and <see cref="Value"/> to <c>null</c>. /// <see cref="ValueStyle"/> is set to <see cref="HtmlAttributeValueStyle.Minimized"/> and <see cref="Value"/> to
/// <c>null</c>.
/// </summary> /// </summary>
/// <param name="name">The <see cref="Name"/> of the attribute.</param> /// <param name="name">The <see cref="Name"/> of the attribute.</param>
public TagHelperAttribute(string name) public TagHelperAttribute(string name)
: this(name, value: null, minimized: true) : this(name, value: null, valueStyle: HtmlAttributeValueStyle.Minimized)
{ {
} }
/// <summary> /// <summary>
/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/> /// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>
/// and <paramref name="value"/>. <see cref="Minimized"/> is set to <c>false</c>. /// and <paramref name="value"/>. <see cref="ValueStyle"/> is set to <see cref="HtmlAttributeValueStyle.DoubleQuotes"/>.
/// </summary> /// </summary>
/// <param name="name">The <see cref="Name"/> of the attribute.</param> /// <param name="name">The <see cref="Name"/> of the attribute.</param>
/// <param name="value">The <see cref="Value"/> of the attribute.</param> /// <param name="value">The <see cref="Value"/> of the attribute.</param>
public TagHelperAttribute(string name, object value) public TagHelperAttribute(string name, object value)
: this(name, value, minimized: false) : this(name, value, valueStyle: HtmlAttributeValueStyle.DoubleQuotes)
{ {
} }
/// <summary> /// <summary>
/// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>, /// Instantiates a new instance of <see cref="TagHelperAttribute"/> with the specified <paramref name="name"/>,
/// <paramref name="value"/> and <paramref name="minimized"/>. /// <paramref name="value"/> and <paramref name="valueStyle"/>.
/// </summary> /// </summary>
/// <param name="name">The <see cref="Name"/> of the new instance.</param> /// <param name="name">The <see cref="Name"/> of the new instance.</param>
/// <param name="value">The <see cref="Value"/> of the new instance.</param> /// <param name="value">The <see cref="Value"/> of the new instance.</param>
/// <param name="minimized">The <see cref="Minimized"/> value of the new instance.</param> /// <param name="valueStyle">The <see cref="ValueStyle"/> of the new instance.</param>
/// <remarks>If <paramref name="minimized"/> is <c>true</c>, <paramref name="value"/> is ignored when this /// <remarks>If <paramref name="valueStyle"/> is <see cref="HtmlAttributeValueStyle.Minimized"/>,
/// instance is rendered.</remarks> /// <paramref name="value"/> is ignored when this instance is rendered.</remarks>
public TagHelperAttribute(string name, object value, bool minimized) public TagHelperAttribute(string name, object value, HtmlAttributeValueStyle valueStyle)
{ {
if (name == null) if (name == null)
{ {
@ -50,7 +54,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
Name = name; Name = name;
Value = value; Value = value;
Minimized = minimized; ValueStyle = valueStyle;
} }
/// <summary> /// <summary>
@ -64,11 +68,9 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
public object Value { get; } public object Value { get; }
/// <summary> /// <summary>
/// Gets an indication whether the attribute is minimized or not. /// Gets the value style of the attribute.
/// </summary> /// </summary>
/// <remarks>If <c>true</c>, <see cref="Value"/> will be ignored.</remarks> public HtmlAttributeValueStyle ValueStyle { get; }
public bool Minimized { get; }
/// <inheritdoc /> /// <inheritdoc />
/// <remarks><see cref="Name"/> is compared case-insensitively.</remarks> /// <remarks><see cref="Name"/> is compared case-insensitively.</remarks>
@ -77,8 +79,147 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
return return
other != null && other != null &&
string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase) && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase) &&
Minimized == other.Minimized && ValueStyle == other.ValueStyle &&
(Minimized || Equals(Value, other.Value)); (ValueStyle == HtmlAttributeValueStyle.Minimized || Equals(Value, other.Value));
}
/// <inheritdoc />
public void WriteTo(TextWriter writer, HtmlEncoder encoder)
{
if (writer == null)
{
throw new ArgumentNullException(nameof(writer));
}
if (encoder == null)
{
throw new ArgumentNullException(nameof(encoder));
}
writer.Write(Name);
if (ValueStyle == HtmlAttributeValueStyle.Minimized)
{
return;
}
var valuePrefix = GetAttributeValuePrefix(ValueStyle);
if (valuePrefix != null)
{
writer.Write(valuePrefix);
}
var htmlContent = Value as IHtmlContent;
if (htmlContent != null)
{
htmlContent.WriteTo(writer, encoder);
}
else if (Value != null)
{
encoder.Encode(writer, Value.ToString());
}
var valueSuffix = GetAttributeValueSuffix(ValueStyle);
if (valueSuffix != null)
{
writer.Write(valueSuffix);
}
}
/// <inheritdoc />
public void CopyTo(IHtmlContentBuilder destination)
{
if (destination == null)
{
throw new ArgumentNullException(nameof(destination));
}
destination.AppendHtml(Name);
if (ValueStyle == HtmlAttributeValueStyle.Minimized)
{
return;
}
var valuePrefix = GetAttributeValuePrefix(ValueStyle);
if (valuePrefix != null)
{
destination.AppendHtml(valuePrefix);
}
string valueAsString;
IHtmlContentContainer valueAsHtmlContainer;
IHtmlContent valueAsHtmlContent;
if ((valueAsString = Value as string) != null)
{
destination.Append(valueAsString);
}
else if ((valueAsHtmlContainer = Value as IHtmlContentContainer) != null)
{
valueAsHtmlContainer.CopyTo(destination);
}
else if ((valueAsHtmlContent = Value as IHtmlContent) != null)
{
destination.AppendHtml(valueAsHtmlContent);
}
else if (Value != null)
{
destination.Append(Value.ToString());
}
var valueSuffix = GetAttributeValueSuffix(ValueStyle);
if (valueSuffix != null)
{
destination.AppendHtml(valueSuffix);
}
}
/// <inheritdoc />
public void MoveTo(IHtmlContentBuilder destination)
{
if (destination == null)
{
throw new ArgumentNullException(nameof(destination));
}
destination.AppendHtml(Name);
if (ValueStyle == HtmlAttributeValueStyle.Minimized)
{
return;
}
var valuePrefix = GetAttributeValuePrefix(ValueStyle);
if (valuePrefix != null)
{
destination.AppendHtml(valuePrefix);
}
string valueAsString;
IHtmlContentContainer valueAsHtmlContainer;
IHtmlContent valueAsHtmlContent;
if ((valueAsString = Value as string) != null)
{
destination.Append(valueAsString);
}
else if ((valueAsHtmlContainer = Value as IHtmlContentContainer) != null)
{
valueAsHtmlContainer.MoveTo(destination);
}
else if ((valueAsHtmlContent = Value as IHtmlContent) != null)
{
destination.AppendHtml(valueAsHtmlContent);
}
else if (Value != null)
{
destination.Append(Value.ToString());
}
var valueSuffix = GetAttributeValueSuffix(ValueStyle);
if (valueSuffix != null)
{
destination.AppendHtml(valueSuffix);
}
} }
/// <inheritdoc /> /// <inheritdoc />
@ -94,10 +235,43 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = HashCodeCombiner.Start();
hashCodeCombiner.Add(Name, StringComparer.Ordinal); hashCodeCombiner.Add(Name, StringComparer.Ordinal);
hashCodeCombiner.Add(Value);
hashCodeCombiner.Add(Minimized); if (ValueStyle != HtmlAttributeValueStyle.Minimized)
{
hashCodeCombiner.Add(Value);
}
hashCodeCombiner.Add(ValueStyle);
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.CombinedHash;
} }
private static string GetAttributeValuePrefix(HtmlAttributeValueStyle valueStyle)
{
switch (valueStyle)
{
case HtmlAttributeValueStyle.DoubleQuotes:
return "=\"";
case HtmlAttributeValueStyle.SingleQuotes:
return "='";
case HtmlAttributeValueStyle.NoQuotes:
return "=";
}
return null;
}
private static string GetAttributeValueSuffix(HtmlAttributeValueStyle valueStyle)
{
switch (valueStyle)
{
case HtmlAttributeValueStyle.DoubleQuotes:
return "\"";
case HtmlAttributeValueStyle.SingleQuotes:
return "'";
}
return null;
}
} }
} }

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -305,7 +306,13 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
destination.AppendHtml("<"); destination.AppendHtml("<");
destination.AppendHtml(TagName); destination.AppendHtml(TagName);
CopyAttributesTo(destination); // Perf: Avoid allocating enumerator
for (var i = 0; i < Attributes.Count; i++)
{
var attribute = Attributes[i];
destination.AppendHtml(" ");
attribute.CopyTo(destination);
}
if (TagMode == TagMode.SelfClosing) if (TagMode == TagMode.SelfClosing)
{ {
@ -350,7 +357,13 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
destination.AppendHtml("<"); destination.AppendHtml("<");
destination.AppendHtml(TagName); destination.AppendHtml(TagName);
CopyAttributesTo(destination); // Perf: Avoid allocating enumerator
for (var i = 0; i < Attributes.Count; i++)
{
var attribute = Attributes[i];
destination.AppendHtml(" ");
attribute.MoveTo(destination);
}
if (TagMode == TagMode.SelfClosing) if (TagMode == TagMode.SelfClosing)
{ {
@ -405,49 +418,11 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
writer.Write(TagName); writer.Write(TagName);
// Perf: Avoid allocating enumerator // Perf: Avoid allocating enumerator
for (var i = 0; i < (Attributes.Count); i++) for (var i = 0; i < Attributes.Count; i++)
{ {
var attribute = Attributes[i]; var attribute = Attributes[i];
writer.Write(" "); writer.Write(" ");
writer.Write(attribute.Name); attribute.WriteTo(writer, encoder);
if (attribute.Minimized)
{
continue;
}
writer.Write("=\"");
var value = attribute.Value;
var htmlContent = value as IHtmlContent;
if (htmlContent != null)
{
// Perf: static text in a bound attribute go down this path. Avoid allocating if possible (common case).
var htmlString = value as HtmlString;
if (htmlString != null && !htmlString.Value.Contains("\""))
{
writer.Write(htmlString.Value);
}
else
{
// There's no way of tracking the attribute value quotations in the Razor source. Therefore, we
// must escape any IHtmlContent double quote values in the case that a user wrote:
// <p name='A " is valid in single quotes'></p>
using (var stringWriter = new StringWriter())
{
htmlContent.WriteTo(stringWriter, encoder);
stringWriter.GetStringBuilder().Replace("\"", "&quot;");
var stringValue = stringWriter.ToString();
writer.Write(stringValue);
}
}
}
else if (value != null)
{
encoder.Encode(writer, value.ToString());
}
writer.Write("\"");
} }
if (TagMode == TagMode.SelfClosing) if (TagMode == TagMode.SelfClosing)
@ -476,76 +451,5 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
_postElement?.WriteTo(writer, encoder); _postElement?.WriteTo(writer, encoder);
} }
private void CopyAttributesTo(IHtmlContentBuilder destination)
{
StringWriter stringWriter = null;
// Perf: Avoid allocating enumerator
for (var i = 0; i < (Attributes.Count); i++)
{
var attribute = Attributes[i];
destination.AppendHtml(" ");
destination.AppendHtml(attribute.Name);
if (attribute.Minimized)
{
continue;
}
destination.AppendHtml("=\"");
var value = attribute.Value;
var htmlContent = value as IHtmlContent;
if (htmlContent != null)
{
// Perf: static text in a bound attribute go down this path. Avoid allocating if possible (common case).
var htmlString = value as HtmlString;
if (htmlString != null && !htmlString.Value.Contains("\""))
{
destination.AppendHtml(htmlString);
}
else
{
// Perf: We'll share this writer implementation for all attributes since
// they can't nest.
stringWriter = stringWriter ?? new StringWriter();
destination.AppendHtml(new AttributeContent(htmlContent, stringWriter));
}
}
else if (value != null)
{
destination.Append(value.ToString());
}
destination.AppendHtml("\"");
}
}
private class AttributeContent : IHtmlContent
{
private readonly IHtmlContent _inner;
private readonly StringWriter _stringWriter;
public AttributeContent(IHtmlContent inner, StringWriter stringWriter)
{
_inner = inner;
_stringWriter = stringWriter;
}
public void WriteTo(TextWriter writer, HtmlEncoder encoder)
{
// There's no way of tracking the attribute value quotations in the Razor source. Therefore, we
// must escape any IHtmlContent double quote values in the case that a user wrote:
// <p name='A " is valid in single quotes'></p>
_inner.WriteTo(_stringWriter, encoder);
_stringWriter.GetStringBuilder().Replace("\"", "&quot;");
var stringValue = _stringWriter.ToString();
writer.Write(stringValue);
_stringWriter.GetStringBuilder().Clear();
}
}
} }
} }

View File

@ -44,7 +44,7 @@ namespace Microsoft.AspNetCore.Razor.Chunks.Generators
tagHelperBlock != null, tagHelperBlock != null,
$"A {nameof(TagHelperChunkGenerator)} must only be used with {nameof(TagHelperBlock)}s."); $"A {nameof(TagHelperChunkGenerator)} must only be used with {nameof(TagHelperBlock)}s.");
var attributes = new List<KeyValuePair<string, Chunk>>(); var attributes = new List<TagHelperAttributeTracker>();
// We need to create a chunk generator to create chunks for each of the attributes. // We need to create a chunk generator to create chunks for each of the attributes.
var chunkGenerator = context.Host.CreateChunkGenerator( var chunkGenerator = context.Host.CreateChunkGenerator(
@ -72,7 +72,12 @@ namespace Microsoft.AspNetCore.Razor.Chunks.Generators
}; };
} }
attributes.Add(new KeyValuePair<string, Chunk>(attribute.Key, attributeChunkValue)); var attributeChunk = new TagHelperAttributeTracker(
attribute.Name,
attributeChunkValue,
attribute.ValueStyle);
attributes.Add(attributeChunk);
// Reset the chunk tree builder so we can build a new one for the next attribute // Reset the chunk tree builder so we can build a new one for the next attribute
chunkGenerator.Context.ChunkTreeBuilder = new ChunkTreeBuilder(); chunkGenerator.Context.ChunkTreeBuilder = new ChunkTreeBuilder();

View File

@ -0,0 +1,23 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Razor.Chunks
{
public struct TagHelperAttributeTracker
{
public TagHelperAttributeTracker(string name, Chunk value, HtmlAttributeValueStyle valueStyle)
{
Name = name;
Value = value;
ValueStyle = valueStyle;
}
public string Name { get; }
public Chunk Value { get; }
public HtmlAttributeValueStyle ValueStyle { get; }
}
}

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Razor.Chunks
public TagHelperChunk( public TagHelperChunk(
string tagName, string tagName,
TagMode tagMode, TagMode tagMode,
IList<KeyValuePair<string, Chunk>> attributes, IList<TagHelperAttributeTracker> attributes,
IEnumerable<TagHelperDescriptor> descriptors) IEnumerable<TagHelperDescriptor> descriptors)
{ {
TagName = tagName; TagName = tagName;
@ -36,11 +36,7 @@ namespace Microsoft.AspNetCore.Razor.Chunks
/// <summary> /// <summary>
/// The HTML attributes. /// The HTML attributes.
/// </summary> /// </summary>
/// <remarks> public IList<TagHelperAttributeTracker> Attributes { get; set; }
/// These attributes are <see cref="string"/> => <see cref="Chunk"/> so attribute values can consist
/// of all sorts of Razor specific pieces.
/// </remarks>
public IList<KeyValuePair<string, Chunk>> Attributes { get; set; }
/// <summary> /// <summary>
/// The <see cref="TagHelperDescriptor"/>s that are associated with the tag helpers HTML element. /// The <see cref="TagHelperDescriptor"/>s that are associated with the tag helpers HTML element.

View File

@ -227,7 +227,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
foreach (var chunkAttribute in chunk.Attributes) foreach (var chunkAttribute in chunk.Attributes)
{ {
var associatedAttributeDescriptor = tagHelperDescriptor.Attributes.FirstOrDefault( var associatedAttributeDescriptor = tagHelperDescriptor.Attributes.FirstOrDefault(
attributeDescriptor => attributeDescriptor.IsNameMatch(chunkAttribute.Key)); attributeDescriptor => attributeDescriptor.IsNameMatch(chunkAttribute.Name));
if (associatedAttributeDescriptor != null && if (associatedAttributeDescriptor != null &&
associatedAttributeDescriptor.IsIndexer && associatedAttributeDescriptor.IsIndexer &&
@ -248,7 +248,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
.Write("throw ") .Write("throw ")
.WriteStartNewObject(nameof(InvalidOperationException)) .WriteStartNewObject(nameof(InvalidOperationException))
.WriteStartMethodInvocation(_tagHelperContext.FormatInvalidIndexerAssignmentMethodName) .WriteStartMethodInvocation(_tagHelperContext.FormatInvalidIndexerAssignmentMethodName)
.WriteStringLiteral(chunkAttribute.Key) .WriteStringLiteral(chunkAttribute.Name)
.WriteParameterSeparator() .WriteParameterSeparator()
.WriteStringLiteral(tagHelperDescriptor.TypeName) .WriteStringLiteral(tagHelperDescriptor.TypeName)
.WriteParameterSeparator() .WriteParameterSeparator()
@ -262,7 +262,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
} }
private void RenderAttributes( private void RenderAttributes(
IList<KeyValuePair<string, Chunk>> chunkAttributes, IList<TagHelperAttributeTracker> chunkAttributes,
IEnumerable<TagHelperDescriptor> tagHelperDescriptors) IEnumerable<TagHelperDescriptor> tagHelperDescriptors)
{ {
var renderedBoundAttributeNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase); var renderedBoundAttributeNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
@ -271,14 +271,13 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
// TagHelperExecutionContext.HtmlAttributes' as we go. // TagHelperExecutionContext.HtmlAttributes' as we go.
foreach (var attribute in chunkAttributes) foreach (var attribute in chunkAttributes)
{ {
var attributeName = attribute.Key;
var attributeValueChunk = attribute.Value; var attributeValueChunk = attribute.Value;
var associatedDescriptors = tagHelperDescriptors.Where(descriptor => var associatedDescriptors = tagHelperDescriptors.Where(descriptor =>
descriptor.Attributes.Any(attributeDescriptor => attributeDescriptor.IsNameMatch(attributeName))); descriptor.Attributes.Any(attributeDescriptor => attributeDescriptor.IsNameMatch(attribute.Name)));
// Bound attributes have associated descriptors. First attribute value wins if there are duplicates; // Bound attributes have associated descriptors. First attribute value wins if there are duplicates;
// later values of duplicate bound attributes are treated as if they were unbound. // later values of duplicate bound attributes are treated as if they were unbound.
if (associatedDescriptors.Any() && renderedBoundAttributeNames.Add(attributeName)) if (associatedDescriptors.Any() && renderedBoundAttributeNames.Add(attribute.Name))
{ {
if (attributeValueChunk == null) if (attributeValueChunk == null)
{ {
@ -294,12 +293,11 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
foreach (var associatedDescriptor in associatedDescriptors) foreach (var associatedDescriptor in associatedDescriptors)
{ {
var associatedAttributeDescriptor = associatedDescriptor.Attributes.First( var associatedAttributeDescriptor = associatedDescriptor.Attributes.First(
attributeDescriptor => attributeDescriptor.IsNameMatch(attributeName)); attributeDescriptor => attributeDescriptor.IsNameMatch(attribute.Name));
var tagHelperVariableName = GetVariableName(associatedDescriptor); var tagHelperVariableName = GetVariableName(associatedDescriptor);
valueAccessor = RenderBoundAttribute( valueAccessor = RenderBoundAttribute(
attributeName, attribute,
attributeValueChunk,
tagHelperVariableName, tagHelperVariableName,
valueAccessor, valueAccessor,
associatedAttributeDescriptor); associatedAttributeDescriptor);
@ -307,14 +305,13 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
} }
else else
{ {
RenderUnboundAttribute(attributeName, attributeValueChunk); RenderUnboundAttribute(attribute);
} }
} }
} }
private string RenderBoundAttribute( private string RenderBoundAttribute(
string attributeName, TagHelperAttributeTracker attribute,
Chunk attributeValueChunk,
string tagHelperVariableName, string tagHelperVariableName,
string previousValueAccessor, string previousValueAccessor,
TagHelperAttributeDescriptor attributeDescriptor) TagHelperAttributeDescriptor attributeDescriptor)
@ -327,7 +324,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
if (attributeDescriptor.IsIndexer) if (attributeDescriptor.IsIndexer)
{ {
var dictionaryKey = attributeName.Substring(attributeDescriptor.Name.Length); var dictionaryKey = attribute.Name.Substring(attributeDescriptor.Name.Length);
currentValueAccessor += $"[\"{dictionaryKey}\"]"; currentValueAccessor += $"[\"{dictionaryKey}\"]";
} }
@ -342,7 +339,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
RenderNewAttributeValueAssignment( RenderNewAttributeValueAssignment(
attributeDescriptor, attributeDescriptor,
bufferableAttribute, bufferableAttribute,
attributeValueChunk, attribute.Value,
currentValueAccessor); currentValueAccessor);
if (_designTimeMode) if (_designTimeMode)
@ -356,9 +353,11 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
.WriteStartInstanceMethodInvocation( .WriteStartInstanceMethodInvocation(
ExecutionContextVariableName, ExecutionContextVariableName,
_tagHelperContext.ExecutionContextAddTagHelperAttributeMethodName) _tagHelperContext.ExecutionContextAddTagHelperAttributeMethodName)
.WriteStringLiteral(attributeName) .WriteStringLiteral(attribute.Name)
.WriteParameterSeparator() .WriteParameterSeparator()
.Write(currentValueAccessor) .Write(currentValueAccessor)
.WriteParameterSeparator()
.Write($"global::{typeof(HtmlAttributeValueStyle).FullName}.{attribute.ValueStyle}")
.WriteEndMethodInvocation(); .WriteEndMethodInvocation();
return currentValueAccessor; return currentValueAccessor;
@ -450,112 +449,93 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
} }
} }
private void RenderUnboundAttribute(string attributeName, Chunk attributeValueChunk) private void RenderUnboundAttribute(TagHelperAttributeTracker attribute)
{ {
// Render children to provide IntelliSense at design time. No need for the execution context logic, it's // Render children to provide IntelliSense at design time. No need for the execution context logic, it's
// a runtime feature. // a runtime feature.
if (_designTimeMode) if (_designTimeMode)
{ {
if (attributeValueChunk != null) if (attribute.Value != null)
{ {
_bodyVisitor.Accept(attributeValueChunk); _bodyVisitor.Accept(attribute.Value);
} }
return; return;
} }
// If we have a minimized attribute there is no value Debug.Assert(attribute.Value != null);
if (attributeValueChunk == null)
{ var attributeValueStyleParameter = $"global::{typeof(HtmlAttributeValueStyle).FullName}.{attribute.ValueStyle}";
_writer
.WriteStartInstanceMethodInvocation( // All simple text and minimized attributes will be pre-allocated.
ExecutionContextVariableName, var preallocatedValue = attribute.Value as PreallocatedTagHelperAttributeChunk;
_tagHelperContext.ExecutionContextAddMinimizedHtmlAttributeMethodName) if (preallocatedValue != null)
.WriteStringLiteral(attributeName)
.WriteEndMethodInvocation();
}
else if (attributeValueChunk is PreallocatedTagHelperAttributeChunk)
{ {
_writer _writer
.WriteStartInstanceMethodInvocation( .WriteStartInstanceMethodInvocation(
ExecutionContextVariableName, ExecutionContextVariableName,
_tagHelperContext.ExecutionContextAddHtmlAttributeMethodName) _tagHelperContext.ExecutionContextAddHtmlAttributeMethodName)
.Write(((PreallocatedTagHelperAttributeChunk)attributeValueChunk).AttributeVariableAccessor) .Write(preallocatedValue.AttributeVariableAccessor)
.WriteEndMethodInvocation(); .WriteEndMethodInvocation();
} }
else if (IsDynamicAttributeValue(attribute.Value))
{
// Dynamic attribute value should be run through the conditional attribute removal system. It's
// unbound and contains C#.
// TagHelper attribute rendering is buffered by default. We do not want to write to the current
// writer.
var currentTargetWriter = _context.TargetWriterName;
var currentWriteAttributeMethodName = _context.Host.GeneratedClassContext.WriteAttributeValueMethodName;
_context.TargetWriterName = null;
Debug.Assert(attribute.Value is ParentChunk);
var children = ((ParentChunk)attribute.Value).Children;
var attributeCount = children.Count(c => c is DynamicCodeAttributeChunk || c is LiteralCodeAttributeChunk);
_writer
.WriteStartMethodInvocation(_tagHelperContext.BeginAddHtmlAttributeValuesMethodName)
.Write(ExecutionContextVariableName)
.WriteParameterSeparator()
.WriteStringLiteral(attribute.Name)
.WriteParameterSeparator()
.Write(attributeCount.ToString(CultureInfo.InvariantCulture))
.WriteParameterSeparator()
.Write(attributeValueStyleParameter)
.WriteEndMethodInvocation();
_attributeCodeVisitor.Accept(attribute.Value);
_writer.WriteMethodInvocation(
_tagHelperContext.EndAddHtmlAttributeValuesMethodName,
ExecutionContextVariableName);
_context.TargetWriterName = currentTargetWriter;
}
else else
{ {
string textValue = null; // This is a data-* attribute which includes C#. Do not perform the conditional attribute removal or
var isPlainTextValue = TryGetPlainTextValue(attributeValueChunk, out textValue); // other special cases used when IsDynamicAttributeValue(). But the attribute must still be buffered to
// determine its final value.
if (isPlainTextValue) // Attribute value is not plain text, must be buffered to determine its final value.
{ BuildBufferedWritingScope(attribute.Value, htmlEncodeValues: true);
// If it's a plain text value then we need to surround the value with quotes.
_writer
.WriteStartInstanceMethodInvocation(
ExecutionContextVariableName,
_tagHelperContext.ExecutionContextAddHtmlAttributeMethodName)
.WriteStringLiteral(attributeName)
.WriteParameterSeparator()
.WriteStartMethodInvocation(_tagHelperContext.MarkAsHtmlEncodedMethodName)
.WriteStringLiteral(textValue)
.WriteEndMethodInvocation(endLine: false)
.WriteEndMethodInvocation();
}
else if (IsDynamicAttributeValue(attributeValueChunk))
{
// Dynamic attribute value should be run through the conditional attribute removal system. It's
// unbound and contains C#.
// TagHelper attribute rendering is buffered by default. We do not want to write to the current _writer
// writer. .WriteStartInstanceMethodInvocation(
var currentTargetWriter = _context.TargetWriterName; ExecutionContextVariableName,
var currentWriteAttributeMethodName = _context.Host.GeneratedClassContext.WriteAttributeValueMethodName; _tagHelperContext.ExecutionContextAddHtmlAttributeMethodName)
_context.TargetWriterName = null; .WriteStringLiteral(attribute.Name)
.WriteParameterSeparator()
.WriteStartMethodInvocation(_tagHelperContext.MarkAsHtmlEncodedMethodName);
Debug.Assert(attributeValueChunk is ParentChunk); RenderBufferedAttributeValueAccessor(_writer);
var children = ((ParentChunk)attributeValueChunk).Children;
var attributeCount = children.Count(c => c is DynamicCodeAttributeChunk || c is LiteralCodeAttributeChunk);
_writer _writer
.WriteStartMethodInvocation(_tagHelperContext.BeginAddHtmlAttributeValuesMethodName) .WriteEndMethodInvocation(endLine: false)
.Write(ExecutionContextVariableName) .WriteParameterSeparator()
.WriteParameterSeparator() .Write(attributeValueStyleParameter)
.WriteStringLiteral(attributeName) .WriteEndMethodInvocation();
.WriteParameterSeparator()
.Write(attributeCount.ToString(CultureInfo.InvariantCulture))
.WriteEndMethodInvocation();
_attributeCodeVisitor.Accept(attributeValueChunk);
_writer.WriteMethodInvocation(
_tagHelperContext.EndAddHtmlAttributeValuesMethodName,
ExecutionContextVariableName);
_context.TargetWriterName = currentTargetWriter;
}
else
{
// HTML attributes are always strings. This attribute contains C# but is not dynamic. This occurs
// when the attribute is a data-* attribute.
// Attribute value is not plain text, must be buffered to determine its final value.
BuildBufferedWritingScope(attributeValueChunk, htmlEncodeValues: true);
_writer
.WriteStartInstanceMethodInvocation(
ExecutionContextVariableName,
_tagHelperContext.ExecutionContextAddHtmlAttributeMethodName)
.WriteStringLiteral(attributeName)
.WriteParameterSeparator()
.WriteStartMethodInvocation(_tagHelperContext.MarkAsHtmlEncodedMethodName);
RenderBufferedAttributeValueAccessor(_writer);
_writer
.WriteEndMethodInvocation(endLine: false)
.WriteEndMethodInvocation();
}
} }
} }

View File

@ -22,7 +22,6 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
ScopeManagerEndMethodName = "End"; ScopeManagerEndMethodName = "End";
ExecutionContextAddMethodName = "Add"; ExecutionContextAddMethodName = "Add";
ExecutionContextAddTagHelperAttributeMethodName = "AddTagHelperAttribute"; ExecutionContextAddTagHelperAttributeMethodName = "AddTagHelperAttribute";
ExecutionContextAddMinimizedHtmlAttributeMethodName = "AddMinimizedHtmlAttribute";
ExecutionContextAddHtmlAttributeMethodName = "AddHtmlAttribute"; ExecutionContextAddHtmlAttributeMethodName = "AddHtmlAttribute";
ExecutionContextOutputPropertyName = "Output"; ExecutionContextOutputPropertyName = "Output";
FormatInvalidIndexerAssignmentMethodName = "FormatInvalidIndexerAssignment"; FormatInvalidIndexerAssignmentMethodName = "FormatInvalidIndexerAssignment";
@ -113,11 +112,6 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
/// </summary> /// </summary>
public string ExecutionContextAddTagHelperAttributeMethodName { get; set; } public string ExecutionContextAddTagHelperAttributeMethodName { get; set; }
/// <summary>
/// The name of the <see cref="ExecutionContextTypeName"/> method used to add minimized HTML attributes.
/// </summary>
public string ExecutionContextAddMinimizedHtmlAttributeMethodName { get; set; }
/// <summary> /// <summary>
/// The name of the <see cref="ExecutionContextTypeName"/> method used to add HTML attributes. /// The name of the <see cref="ExecutionContextTypeName"/> method used to add HTML attributes.
/// </summary> /// </summary>

View File

@ -3,8 +3,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using Microsoft.AspNetCore.Razor.Chunks; using Microsoft.AspNetCore.Razor.Chunks;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Internal; using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
@ -107,16 +109,18 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
{ {
var attribute = chunk.Attributes[i]; var attribute = chunk.Attributes[i];
var hasAssociatedDescriptors = chunk.Descriptors.Any(descriptor => var hasAssociatedDescriptors = chunk.Descriptors.Any(descriptor =>
descriptor.Attributes.Any(attributeDescriptor => attributeDescriptor.IsNameMatch(attribute.Key))); descriptor.Attributes.Any(attributeDescriptor => attributeDescriptor.IsNameMatch(attribute.Name)));
// If there's no descriptors associated or we're hitting a bound attribute a second time. // If there's no descriptors associated or we're hitting a bound attribute a second time.
if (!hasAssociatedDescriptors || !boundAttributes.Add(attribute.Key)) if (!hasAssociatedDescriptors || !boundAttributes.Add(attribute.Name))
{ {
string preAllocatedAttributeVariableName = null; string preAllocatedAttributeVariableName = null;
if (attribute.Value == null) if (attribute.ValueStyle == HtmlAttributeValueStyle.Minimized)
{ {
var preAllocatedAttributeKey = new TagHelperAttributeKey(attribute.Key, value: null); Debug.Assert(attribute.Value == null);
var preAllocatedAttributeKey = new TagHelperAttributeKey(attribute.Name, value: null, valueStyle: attribute.ValueStyle);
if (TryCachePreallocatedVariableName(preAllocatedAttributeKey, out preAllocatedAttributeVariableName)) if (TryCachePreallocatedVariableName(preAllocatedAttributeKey, out preAllocatedAttributeVariableName))
{ {
Writer Writer
@ -126,16 +130,18 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
.Write(preAllocatedAttributeVariableName) .Write(preAllocatedAttributeVariableName)
.Write(" = ") .Write(" = ")
.WriteStartNewObject("global::" + _tagHelperContext.TagHelperAttributeTypeName) .WriteStartNewObject("global::" + _tagHelperContext.TagHelperAttributeTypeName)
.WriteStringLiteral(attribute.Key) .WriteStringLiteral(attribute.Name)
.WriteEndMethodInvocation(); .WriteEndMethodInvocation();
} }
} }
else else
{ {
Debug.Assert(attribute.Value != null);
string plainText; string plainText;
if (CSharpTagHelperCodeRenderer.TryGetPlainTextValue(attribute.Value, out plainText)) if (CSharpTagHelperCodeRenderer.TryGetPlainTextValue(attribute.Value, out plainText))
{ {
var preAllocatedAttributeKey = new TagHelperAttributeKey(attribute.Key, plainText); var preAllocatedAttributeKey = new TagHelperAttributeKey(attribute.Name, plainText, attribute.ValueStyle);
if (TryCachePreallocatedVariableName(preAllocatedAttributeKey, out preAllocatedAttributeVariableName)) if (TryCachePreallocatedVariableName(preAllocatedAttributeKey, out preAllocatedAttributeVariableName))
{ {
Writer Writer
@ -145,11 +151,13 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
.Write(preAllocatedAttributeVariableName) .Write(preAllocatedAttributeVariableName)
.Write(" = ") .Write(" = ")
.WriteStartNewObject("global::" + _tagHelperContext.TagHelperAttributeTypeName) .WriteStartNewObject("global::" + _tagHelperContext.TagHelperAttributeTypeName)
.WriteStringLiteral(attribute.Key) .WriteStringLiteral(attribute.Name)
.WriteParameterSeparator() .WriteParameterSeparator()
.WriteStartNewObject("global::" + _tagHelperContext.EncodedHtmlStringTypeName) .WriteStartNewObject("global::" + _tagHelperContext.EncodedHtmlStringTypeName)
.WriteStringLiteral(plainText) .WriteStringLiteral(plainText)
.WriteEndMethodInvocation(endLine: false) .WriteEndMethodInvocation(endLine: false)
.WriteParameterSeparator()
.Write($"global::{typeof(HtmlAttributeValueStyle).FullName}.{attribute.ValueStyle}")
.WriteEndMethodInvocation(); .WriteEndMethodInvocation();
} }
} }
@ -157,12 +165,13 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
if (preAllocatedAttributeVariableName != null) if (preAllocatedAttributeVariableName != null)
{ {
chunk.Attributes[i] = new KeyValuePair<string, Chunk>( chunk.Attributes[i] = new TagHelperAttributeTracker(
attribute.Key, attribute.Name,
new PreallocatedTagHelperAttributeChunk new PreallocatedTagHelperAttributeChunk
{ {
AttributeVariableAccessor = preAllocatedAttributeVariableName AttributeVariableAccessor = preAllocatedAttributeVariableName
}); },
attribute.ValueStyle);
} }
} }
} }
@ -215,21 +224,25 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
private struct TagHelperAttributeKey : IEquatable<TagHelperAttributeKey> private struct TagHelperAttributeKey : IEquatable<TagHelperAttributeKey>
{ {
public TagHelperAttributeKey(string name, string value) public TagHelperAttributeKey(string name, string value, HtmlAttributeValueStyle valueStyle)
{ {
Name = name; Name = name;
Value = value; Value = value;
ValueStyle = valueStyle;
} }
public string Name { get; } public string Name { get; }
public string Value { get; } public string Value { get; }
public HtmlAttributeValueStyle ValueStyle { get; }
public override int GetHashCode() public override int GetHashCode()
{ {
var hashCodeCombiner = HashCodeCombiner.Start(); var hashCodeCombiner = HashCodeCombiner.Start();
hashCodeCombiner.Add(Name, StringComparer.Ordinal); hashCodeCombiner.Add(Name, StringComparer.Ordinal);
hashCodeCombiner.Add(Value, StringComparer.Ordinal); hashCodeCombiner.Add(Value, StringComparer.Ordinal);
hashCodeCombiner.Add(ValueStyle);
return hashCodeCombiner.CombinedHash; return hashCodeCombiner.CombinedHash;
} }
@ -249,7 +262,8 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators.Visitors
public bool Equals(TagHelperAttributeKey other) public bool Equals(TagHelperAttributeKey other)
{ {
return string.Equals(Name, other.Name, StringComparison.Ordinal) && return string.Equals(Name, other.Name, StringComparison.Ordinal) &&
string.Equals(Value, other.Value, StringComparison.Ordinal); string.Equals(Value, other.Value, StringComparison.Ordinal) &&
ValueStyle == other.ValueStyle;
} }
} }
} }

View File

@ -0,0 +1,30 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Parser.SyntaxTree;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
{
public class TagHelperAttributeNode
{
public TagHelperAttributeNode(string name, SyntaxTreeNode value, HtmlAttributeValueStyle valueStyle)
{
Name = name;
Value = value;
ValueStyle = valueStyle;
}
// Internal for testing
internal TagHelperAttributeNode(string name, SyntaxTreeNode value)
: this(name, value, HtmlAttributeValueStyle.DoubleQuotes)
{
}
public string Name { get; }
public SyntaxTreeNode Value { get; }
public HtmlAttributeValueStyle ValueStyle { get; }
}
}

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
{ {
TagName = source.TagName; TagName = source.TagName;
Descriptors = source.Descriptors; Descriptors = source.Descriptors;
Attributes = new List<KeyValuePair<string, SyntaxTreeNode>>(source.Attributes); Attributes = new List<TagHelperAttributeNode>(source.Attributes);
_start = source.Start; _start = source.Start;
TagMode = source.TagMode; TagMode = source.TagMode;
SourceStartTag = source.SourceStartTag; SourceStartTag = source.SourceStartTag;
@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
/// <summary> /// <summary>
/// The HTML attributes. /// The HTML attributes.
/// </summary> /// </summary>
public IList<KeyValuePair<string, SyntaxTreeNode>> Attributes { get; } public IList<TagHelperAttributeNode> Attributes { get; }
/// <inheritdoc /> /// <inheritdoc />
public override SourceLocation Start public override SourceLocation Start

View File

@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
{ {
TagName = original.TagName; TagName = original.TagName;
Descriptors = original.Descriptors; Descriptors = original.Descriptors;
Attributes = new List<KeyValuePair<string, SyntaxTreeNode>>(original.Attributes); Attributes = new List<TagHelperAttributeNode>(original.Attributes);
} }
/// <summary> /// <summary>
@ -41,14 +41,14 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
string tagName, string tagName,
TagMode tagMode, TagMode tagMode,
SourceLocation start, SourceLocation start,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes, IList<TagHelperAttributeNode> attributes,
IEnumerable<TagHelperDescriptor> descriptors) IEnumerable<TagHelperDescriptor> descriptors)
{ {
TagName = tagName; TagName = tagName;
TagMode = tagMode; TagMode = tagMode;
Start = start; Start = start;
Descriptors = descriptors; Descriptors = descriptors;
Attributes = new List<KeyValuePair<string, SyntaxTreeNode>>(attributes); Attributes = new List<TagHelperAttributeNode>(attributes);
Type = BlockType.Tag; Type = BlockType.Tag;
ChunkGenerator = new TagHelperChunkGenerator(descriptors); ChunkGenerator = new TagHelperChunkGenerator(descriptors);
} }
@ -57,7 +57,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
internal TagHelperBlockBuilder( internal TagHelperBlockBuilder(
string tagName, string tagName,
TagMode tagMode, TagMode tagMode,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes, IList<TagHelperAttributeNode> attributes,
IEnumerable<SyntaxTreeNode> children) IEnumerable<SyntaxTreeNode> children)
{ {
TagName = tagName; TagName = tagName;
@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers
/// <summary> /// <summary>
/// The HTML attributes. /// The HTML attributes.
/// </summary> /// </summary>
public IList<KeyValuePair<string, SyntaxTreeNode>> Attributes { get; } public IList<TagHelperAttributeNode> Attributes { get; }
/// <summary> /// <summary>
/// The HTML tag name. /// The HTML tag name.

View File

@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
return new TagHelperBlockBuilder(tagName, tagMode, start, attributes, descriptors); return new TagHelperBlockBuilder(tagName, tagMode, start, attributes, descriptors);
} }
private static IList<KeyValuePair<string, SyntaxTreeNode>> GetTagAttributes( private static IList<TagHelperAttributeNode> GetTagAttributes(
string tagName, string tagName,
bool validStructure, bool validStructure,
Block tagBlock, Block tagBlock,
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
// contained TagHelperAttributeDescriptor's. // contained TagHelperAttributeDescriptor's.
descriptors = descriptors.Distinct(TypeBasedTagHelperDescriptorComparer.Default); descriptors = descriptors.Distinct(TypeBasedTagHelperDescriptorComparer.Default);
var attributes = new List<KeyValuePair<string, SyntaxTreeNode>>(); var attributes = new List<TagHelperAttributeNode>();
// We skip the first child "<tagname" and take everything up to the ending portion of the tag ">" or "/>". // We skip the first child "<tagname" and take everything up to the ending portion of the tag ">" or "/>".
// The -2 accounts for both the start and end tags. If the tag does not have a valid structure then there's // The -2 accounts for both the start and end tags. If the tag does not have a valid structure then there's
@ -102,8 +102,12 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
result.AttributeName.Length); result.AttributeName.Length);
} }
attributes.Add( var attributeNode = new TagHelperAttributeNode(
new KeyValuePair<string, SyntaxTreeNode>(result.AttributeName, result.AttributeValueNode)); result.AttributeName,
result.AttributeValueNode,
result.AttributeValueStyle);
attributes.Add(attributeNode);
} }
else else
{ {
@ -161,6 +165,10 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
var capturedAttributeValueStart = false; var capturedAttributeValueStart = false;
var attributeValueStartLocation = span.Start; var attributeValueStartLocation = span.Start;
// Default to DoubleQuotes. We purposefully do not persist NoQuotes ValueStyle to stay consistent with the
// TryParseBlock() variation of attribute parsing.
var attributeValueStyle = HtmlAttributeValueStyle.DoubleQuotes;
// The symbolOffset is initialized to 0 to expect worst case: "class=". If a quote is found later on for // The symbolOffset is initialized to 0 to expect worst case: "class=". If a quote is found later on for
// the attribute value the symbolOffset is adjusted accordingly. // the attribute value the symbolOffset is adjusted accordingly.
var symbolOffset = 0; var symbolOffset = 0;
@ -229,6 +237,11 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
// Check for attribute start values, aka single or double quote // Check for attribute start values, aka single or double quote
if (i < htmlSymbols.Length && IsQuote(htmlSymbols[i])) if (i < htmlSymbols.Length && IsQuote(htmlSymbols[i]))
{ {
if (htmlSymbols[i].Type == HtmlSymbolType.SingleQuote)
{
attributeValueStyle = HtmlAttributeValueStyle.SingleQuotes;
}
symbolStartLocation = htmlSymbols[i].Start; symbolStartLocation = htmlSymbols[i].Start;
// If there's a start quote then there must be an end quote to be valid, skip it. // If there's a start quote then there must be an end quote to be valid, skip it.
@ -290,8 +303,13 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
{ {
attributeValue = CreateMarkupAttribute(builder, result.IsBoundNonStringAttribute); attributeValue = CreateMarkupAttribute(builder, result.IsBoundNonStringAttribute);
} }
else
{
attributeValueStyle = HtmlAttributeValueStyle.Minimized;
}
result.AttributeValueNode = attributeValue; result.AttributeValueNode = attributeValue;
result.AttributeValueStyle = attributeValueStyle;
return result; return result;
} }
@ -347,6 +365,30 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
// Have a name now. Able to determine correct isBoundNonStringAttribute value. // Have a name now. Able to determine correct isBoundNonStringAttribute value.
var result = CreateTryParseResult(name, descriptors); var result = CreateTryParseResult(name, descriptors);
var firstChild = builder.Children[0] as Span;
if (firstChild != null && firstChild.Symbols[0] is HtmlSymbol)
{
var htmlSymbol = firstChild.Symbols[firstChild.Symbols.Count - 1] as HtmlSymbol;
switch (htmlSymbol.Type)
{
// Treat NoQuotes and DoubleQuotes equivalently. We purposefully do not persist NoQuotes
// ValueStyles at code generation time to protect users from rendering dynamic content with spaces
// that can break attributes.
// Ex: <tag my-attribute=@value /> where @value results in the test "hello world".
// This way, the above code would render <tag my-attribute="hello world" />.
case HtmlSymbolType.Equals:
case HtmlSymbolType.DoubleQuote:
result.AttributeValueStyle = HtmlAttributeValueStyle.DoubleQuotes;
break;
case HtmlSymbolType.SingleQuote:
result.AttributeValueStyle = HtmlAttributeValueStyle.SingleQuotes;
break;
default:
result.AttributeValueStyle = HtmlAttributeValueStyle.Minimized;
break;
}
}
// Remove first child i.e. foo=" // Remove first child i.e. foo="
builder.Children.RemoveAt(0); builder.Children.RemoveAt(0);
@ -664,6 +706,8 @@ namespace Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal
public SyntaxTreeNode AttributeValueNode { get; set; } public SyntaxTreeNode AttributeValueNode { get; set; }
public HtmlAttributeValueStyle AttributeValueStyle { get; set; }
public bool IsBoundAttribute { get; set; } public bool IsBoundAttribute { get; set; }
public bool IsBoundNonStringAttribute { get; set; } public bool IsBoundNonStringAttribute { get; set; }

View File

@ -0,0 +1,13 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Razor.TagHelpers
{
public enum HtmlAttributeValueStyle
{
DoubleQuotes,
SingleQuotes,
NoQuotes,
Minimized,
}
}

View File

@ -3,6 +3,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.Extensions.Internal;
namespace Microsoft.AspNetCore.Razor.TagHelpers namespace Microsoft.AspNetCore.Razor.TagHelpers
{ {
@ -25,13 +26,17 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
// Normal comparer (TagHelperAttribute.Equals()) doesn't care about the Name case, in tests we do. // Normal comparer (TagHelperAttribute.Equals()) doesn't care about the Name case, in tests we do.
return attributeX != null && return attributeX != null &&
string.Equals(attributeX.Name, attributeY.Name, StringComparison.Ordinal) && string.Equals(attributeX.Name, attributeY.Name, StringComparison.Ordinal) &&
attributeX.Minimized == attributeY.Minimized && attributeX.ValueStyle == attributeY.ValueStyle &&
(attributeX.Minimized || Equals(attributeX.Value, attributeY.Value)); (attributeX.ValueStyle == HtmlAttributeValueStyle.Minimized || Equals(attributeX.Value, attributeY.Value));
} }
public int GetHashCode(TagHelperAttribute attribute) public int GetHashCode(TagHelperAttribute attribute)
{ {
return attribute.GetHashCode(); var combiner = HashCodeCombiner.Start();
combiner.Add(attribute.Name, StringComparer.Ordinal);
combiner.Add(attribute.GetHashCode());
return combiner.CombinedHash;
} }
} }
} }

View File

@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
updatedCallCount++; updatedCallCount++;
return Task.FromResult(true); return Task.FromResult(true);
}; };
executionContext.AddMinimizedHtmlAttribute("something"); executionContext.AddHtmlAttribute(new TagHelperAttribute("something"));
// Act - 1 // Act - 1
executionContext.Reinitialize( executionContext.Reinitialize(
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
items: new Dictionary<object, object>(), items: new Dictionary<object, object>(),
uniqueId: string.Empty, uniqueId: string.Empty,
executeChildContentAsync: updatedExecuteChildContentAsync); executeChildContentAsync: updatedExecuteChildContentAsync);
executionContext.AddMinimizedHtmlAttribute("Another attribute"); executionContext.AddHtmlAttribute(new TagHelperAttribute("Another attribute"));
// Assert - 1 // Assert - 1
var output = executionContext.Output; var output = executionContext.Output;
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
endWritingScope); endWritingScope);
var updatedItems = new Dictionary<object, object>(); var updatedItems = new Dictionary<object, object>();
var updatedUniqueId = "another unique id"; var updatedUniqueId = "another unique id";
executionContext.AddMinimizedHtmlAttribute("something"); executionContext.AddHtmlAttribute(new TagHelperAttribute("something"));
// Act // Act
executionContext.Reinitialize( executionContext.Reinitialize(
@ -132,7 +132,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
updatedItems, updatedItems,
updatedUniqueId, updatedUniqueId,
executeChildContentAsync); executeChildContentAsync);
executionContext.AddMinimizedHtmlAttribute("Another attribute"); executionContext.AddHtmlAttribute(new TagHelperAttribute("Another attribute"));
// Assert // Assert
var context = executionContext.Context; var context = executionContext.Context;
@ -409,12 +409,12 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
var expectedAttributes = new TagHelperAttributeList var expectedAttributes = new TagHelperAttributeList
{ {
{ "class", "btn" }, { "class", "btn" },
{ "foo", "bar" }
}; };
expectedAttributes.Add(new TagHelperAttribute("type", "text", HtmlAttributeValueStyle.SingleQuotes));
// Act // Act
executionContext.AddHtmlAttribute("class", "btn"); executionContext.AddHtmlAttribute("class", "btn", HtmlAttributeValueStyle.DoubleQuotes);
executionContext.AddHtmlAttribute("foo", "bar"); executionContext.AddHtmlAttribute("type", "text", HtmlAttributeValueStyle.SingleQuotes);
var output = executionContext.Output; var output = executionContext.Output;
// Assert // Assert
@ -425,7 +425,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
} }
[Fact] [Fact]
public void AddMinimizedHtmlAttribute_MaintainsHtmlAttributes() public void AddHtmlAttribute_MaintainsMinimizedHtmlAttributes()
{ {
// Arrange // Arrange
var executionContext = new TagHelperExecutionContext("input", tagMode: TagMode.StartTagOnly); var executionContext = new TagHelperExecutionContext("input", tagMode: TagMode.StartTagOnly);
@ -436,8 +436,8 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
}; };
// Act // Act
executionContext.AddMinimizedHtmlAttribute("checked"); executionContext.AddHtmlAttribute(new TagHelperAttribute("checked"));
executionContext.AddMinimizedHtmlAttribute("visible"); executionContext.AddHtmlAttribute(new TagHelperAttribute("visible"));
var output = executionContext.Output; var output = executionContext.Output;
// Assert // Assert
@ -448,7 +448,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
} }
[Fact] [Fact]
public void AddMinimizedHtmlAttribute_MaintainsHtmlAttributes_SomeMinimized() public void AddHtmlAttribute_MaintainsHtmlAttributes_VariousStyles()
{ {
// Arrange // Arrange
var executionContext = new TagHelperExecutionContext("input", tagMode: TagMode.SelfClosing); var executionContext = new TagHelperExecutionContext("input", tagMode: TagMode.SelfClosing);
@ -457,14 +457,18 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
{ "class", "btn" }, { "class", "btn" },
{ "foo", "bar" } { "foo", "bar" }
}; };
expectedAttributes.Add(new TagHelperAttribute("valid", "true", HtmlAttributeValueStyle.NoQuotes));
expectedAttributes.Add(new TagHelperAttribute("type", "text", HtmlAttributeValueStyle.SingleQuotes));
expectedAttributes.Add(new TagHelperAttribute(name: "checked")); expectedAttributes.Add(new TagHelperAttribute(name: "checked"));
expectedAttributes.Add(new TagHelperAttribute(name: "visible")); expectedAttributes.Add(new TagHelperAttribute(name: "visible"));
// Act // Act
executionContext.AddHtmlAttribute("class", "btn"); executionContext.AddHtmlAttribute("class", "btn", HtmlAttributeValueStyle.DoubleQuotes);
executionContext.AddHtmlAttribute("foo", "bar"); executionContext.AddHtmlAttribute("foo", "bar", HtmlAttributeValueStyle.DoubleQuotes);
executionContext.AddMinimizedHtmlAttribute("checked"); executionContext.AddHtmlAttribute("valid", "true", HtmlAttributeValueStyle.NoQuotes);
executionContext.AddMinimizedHtmlAttribute("visible"); executionContext.AddHtmlAttribute("type", "text", HtmlAttributeValueStyle.SingleQuotes);
executionContext.AddHtmlAttribute(new TagHelperAttribute("checked"));
executionContext.AddHtmlAttribute(new TagHelperAttribute("visible"));
var output = executionContext.Output; var output = executionContext.Output;
// Assert // Assert
@ -482,14 +486,14 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
var expectedAttributes = new TagHelperAttributeList var expectedAttributes = new TagHelperAttributeList
{ {
{ "class", "btn" }, { "class", "btn" },
{ "something", true },
{ "foo", "bar" }
}; };
expectedAttributes.Add(new TagHelperAttribute("something", true, HtmlAttributeValueStyle.SingleQuotes));
expectedAttributes.Add(new TagHelperAttribute("type", "text", HtmlAttributeValueStyle.NoQuotes));
// Act // Act
executionContext.AddHtmlAttribute("class", "btn"); executionContext.AddHtmlAttribute("class", "btn", HtmlAttributeValueStyle.DoubleQuotes);
executionContext.AddTagHelperAttribute("something", true); executionContext.AddTagHelperAttribute("something", true, HtmlAttributeValueStyle.SingleQuotes);
executionContext.AddHtmlAttribute("foo", "bar"); executionContext.AddHtmlAttribute("type", "text", HtmlAttributeValueStyle.NoQuotes);
var context = executionContext.Context; var context = executionContext.Context;
// Assert // Assert

View File

@ -124,7 +124,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
var tagHelper = new TagHelperContextTouchingTagHelper(); var tagHelper = new TagHelperContextTouchingTagHelper();
executionContext.Add(tagHelper); executionContext.Add(tagHelper);
executionContext.AddTagHelperAttribute("foo", true); executionContext.AddTagHelperAttribute("foo", true, HtmlAttributeValueStyle.DoubleQuotes);
// Act // Act
await runner.RunAsync(executionContext); await runner.RunAsync(executionContext);
@ -162,7 +162,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
// Act // Act
executionContext.Add(executableTagHelper); executionContext.Add(executableTagHelper);
executionContext.AddHtmlAttribute("class", "btn"); executionContext.AddHtmlAttribute("class", "btn", HtmlAttributeValueStyle.DoubleQuotes);
await runner.RunAsync(executionContext); await runner.RunAsync(executionContext);
// Assert // Assert
@ -183,7 +183,7 @@ namespace Microsoft.AspNetCore.Razor.Runtime.TagHelpers
// Act // Act
executionContext.Add(tagHelper); executionContext.Add(tagHelper);
executionContext.AddTagHelperAttribute("foo", true); executionContext.AddTagHelperAttribute("foo", true, HtmlAttributeValueStyle.DoubleQuotes);
await runner.RunAsync(executionContext); await runner.RunAsync(executionContext);
// Assert // Assert

View File

@ -478,6 +478,22 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
postElement: null), postElement: null),
"<p test=\"HtmlEncode[[testVal]]\" something=\"HtmlEncode[[ spaced ]]\">Hello World!</p>" "<p test=\"HtmlEncode[[testVal]]\" something=\"HtmlEncode[[ spaced ]]\">Hello World!</p>"
}, },
{
GetTagHelperOutput(
tagName: "p",
attributes: new TagHelperAttributeList()
{
{ new TagHelperAttribute("test", "testVal", HtmlAttributeValueStyle.NoQuotes) },
{ new TagHelperAttribute("something", " spaced ", HtmlAttributeValueStyle.SingleQuotes) },
},
tagMode: TagMode.StartTagAndEndTag,
preElement: null,
preContent: null,
content: "Hello World!",
postContent: null,
postElement: null),
"<p test=HtmlEncode[[testVal]] something='HtmlEncode[[ spaced ]]'>Hello World!</p>"
},
{ {
GetTagHelperOutput( GetTagHelperOutput(
tagName: "p", tagName: "p",
@ -531,7 +547,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
attributes: new TagHelperAttributeList() attributes: new TagHelperAttributeList()
{ {
new TagHelperAttribute("test"), new TagHelperAttribute("test"),
new TagHelperAttribute("last", "unminimized"), new TagHelperAttribute("last", "unminimized", HtmlAttributeValueStyle.NoQuotes),
}, },
tagMode: TagMode.StartTagAndEndTag, tagMode: TagMode.StartTagAndEndTag,
preElement: null, preElement: null,
@ -539,7 +555,7 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
content: "Hello World!", content: "Hello World!",
postContent: null, postContent: null,
postElement: null), postElement: null),
"<p test last=\"HtmlEncode[[unminimized]]\">Hello World!</p>" "<p test last=HtmlEncode[[unminimized]]>Hello World!</p>"
}, },
{ {
GetTagHelperOutput( GetTagHelperOutput(
@ -572,14 +588,17 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
{ {
GetTagHelperOutput( GetTagHelperOutput(
tagName: "p", tagName: "p",
attributes: new TagHelperAttributeList() { { "test", "testVal" } }, attributes: new TagHelperAttributeList()
{
{ new TagHelperAttribute("test", "testVal", HtmlAttributeValueStyle.SingleQuotes) }
},
tagMode: TagMode.StartTagOnly, tagMode: TagMode.StartTagOnly,
preElement: null, preElement: null,
preContent: null, preContent: null,
content: "Hello World!", content: "Hello World!",
postContent: null, postContent: null,
postElement: null), postElement: null),
"<p test=\"HtmlEncode[[testVal]]\">" "<p test='HtmlEncode[[testVal]]'>"
}, },
{ {
GetTagHelperOutput( GetTagHelperOutput(
@ -777,6 +796,21 @@ namespace Microsoft.AspNetCore.Razor.TagHelpers
postElement: null), postElement: null),
"Before" "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( GetTagHelperOutput(
tagName: "custom", tagName: "custom",

View File

@ -1307,12 +1307,20 @@ namespace Microsoft.AspNetCore.Razor.Test.Generator
generatedLineIndex: 36, generatedLineIndex: 36,
generatedCharacterOffsetIndex: 42, generatedCharacterOffsetIndex: 42,
contentLength: 4), contentLength: 4),
BuildLineMapping(
documentAbsoluteIndex: 220,
documentLineIndex: 5,
documentCharacterOffsetIndex: 34,
generatedAbsoluteIndex: 2234,
generatedLineIndex: 45,
generatedCharacterOffsetIndex: 42,
contentLength: 4),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 41, documentAbsoluteIndex: 41,
documentLineIndex: 2, documentLineIndex: 2,
documentCharacterOffsetIndex: 8, documentCharacterOffsetIndex: 8,
generatedAbsoluteIndex: 1962, generatedAbsoluteIndex: 2447,
generatedLineIndex: 42, generatedLineIndex: 51,
generatedCharacterOffsetIndex: 33, generatedCharacterOffsetIndex: 33,
contentLength: 1), contentLength: 1),
} }

View File

@ -241,14 +241,14 @@ namespace Microsoft.AspNetCore.Razor.Test.Generator
return new TagHelperChunk( return new TagHelperChunk(
tagName, tagName,
tagMode: TagMode.StartTagAndEndTag, tagMode: TagMode.StartTagAndEndTag,
attributes: new List<KeyValuePair<string, Chunk>>(), attributes: new List<TagHelperAttributeTracker>(),
descriptors: tagHelperDescriptors) descriptors: tagHelperDescriptors)
{ {
Association = new TagHelperBlock( Association = new TagHelperBlock(
new TagHelperBlockBuilder( new TagHelperBlockBuilder(
tagName, tagName,
tagMode: TagMode.StartTagAndEndTag, tagMode: TagMode.StartTagAndEndTag,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>>(), attributes: new List<TagHelperAttributeNode>(),
children: Enumerable.Empty<SyntaxTreeNode>())), children: Enumerable.Empty<SyntaxTreeNode>())),
Children = new List<Chunk>(), Children = new List<Chunk>(),
}; };

View File

@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
var builder = new TagHelperBlockBuilder( var builder = new TagHelperBlockBuilder(
tagName, tagName,
tagMode, tagMode,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>>(), attributes: new List<TagHelperAttributeNode>(),
children: children) children: children)
{ {
Start = start, Start = start,

View File

@ -132,18 +132,18 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
public class MarkupTagHelperBlock : TagHelperBlock public class MarkupTagHelperBlock : TagHelperBlock
{ {
public MarkupTagHelperBlock(string tagName) public MarkupTagHelperBlock(string tagName)
: this(tagName, tagMode: TagMode.StartTagAndEndTag, attributes: new List<KeyValuePair<string, SyntaxTreeNode>>()) : this(tagName, tagMode: TagMode.StartTagAndEndTag, attributes: new List<TagHelperAttributeNode>())
{ {
} }
public MarkupTagHelperBlock(string tagName, TagMode tagMode) public MarkupTagHelperBlock(string tagName, TagMode tagMode)
: this(tagName, tagMode, new List<KeyValuePair<string, SyntaxTreeNode>>()) : this(tagName, tagMode, new List<TagHelperAttributeNode>())
{ {
} }
public MarkupTagHelperBlock( public MarkupTagHelperBlock(
string tagName, string tagName,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes) IList<TagHelperAttributeNode> attributes)
: this(tagName, TagMode.StartTagAndEndTag, attributes, children: new SyntaxTreeNode[0]) : this(tagName, TagMode.StartTagAndEndTag, attributes, children: new SyntaxTreeNode[0])
{ {
} }
@ -151,7 +151,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
public MarkupTagHelperBlock( public MarkupTagHelperBlock(
string tagName, string tagName,
TagMode tagMode, TagMode tagMode,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes) IList<TagHelperAttributeNode> attributes)
: this(tagName, tagMode, attributes, new SyntaxTreeNode[0]) : this(tagName, tagMode, attributes, new SyntaxTreeNode[0])
{ {
} }
@ -160,19 +160,19 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
: this( : this(
tagName, tagName,
TagMode.StartTagAndEndTag, TagMode.StartTagAndEndTag,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>>(), attributes: new List<TagHelperAttributeNode>(),
children: children) children: children)
{ {
} }
public MarkupTagHelperBlock(string tagName, TagMode tagMode, params SyntaxTreeNode[] children) public MarkupTagHelperBlock(string tagName, TagMode tagMode, params SyntaxTreeNode[] children)
: this(tagName, tagMode, new List<KeyValuePair<string, SyntaxTreeNode>>(), children) : this(tagName, tagMode, new List<TagHelperAttributeNode>(), children)
{ {
} }
public MarkupTagHelperBlock( public MarkupTagHelperBlock(
string tagName, string tagName,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes, IList<TagHelperAttributeNode> attributes,
params SyntaxTreeNode[] children) params SyntaxTreeNode[] children)
: base(new TagHelperBlockBuilder( : base(new TagHelperBlockBuilder(
tagName, tagName,
@ -185,7 +185,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
public MarkupTagHelperBlock( public MarkupTagHelperBlock(
string tagName, string tagName,
TagMode tagMode, TagMode tagMode,
IList<KeyValuePair<string, SyntaxTreeNode>> attributes, IList<TagHelperAttributeNode> attributes,
params SyntaxTreeNode[] children) params SyntaxTreeNode[] children)
: base(new TagHelperBlockBuilder(tagName, tagMode, attributes, children)) : base(new TagHelperBlockBuilder(tagName, tagMode, attributes, children))
{ {

View File

@ -324,24 +324,30 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
} }
} }
private static void EvaluateTagHelperAttribute(ErrorCollector collector, private static void EvaluateTagHelperAttribute(
KeyValuePair<string, SyntaxTreeNode> actual, ErrorCollector collector,
KeyValuePair<string, SyntaxTreeNode> expected) 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 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 else
{
collector.AddMessage("{0} - PASSED :: Attribute value style match", expected.ValueStyle);
}
if (actual.ValueStyle != HtmlAttributeValueStyle.Minimized)
{ {
EvaluateSyntaxTreeNode(collector, actual.Value, expected.Value); EvaluateSyntaxTreeNode(collector, actual.Value, expected.Value);
} }
@ -435,7 +441,7 @@ namespace Microsoft.AspNetCore.Razor.Test.Framework
} }
while (actualAttributes.MoveNext()) 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);
} }
} }
} }

View File

@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Razor.Test.Framework;
using Microsoft.AspNetCore.Razor.Text; using Microsoft.AspNetCore.Razor.Text;
using Xunit; using Xunit;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal; using Microsoft.AspNetCore.Razor.Parser.TagHelpers.Internal;
using Microsoft.AspNetCore.Razor.Parser.TagHelpers;
namespace Microsoft.AspNetCore.Razor.Test.TagHelpers namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
{ {
@ -766,9 +767,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
}; };
var expectedOutput = new MarkupBlock( var expectedOutput = new MarkupBlock(
new MarkupTagHelperBlock("strong", new MarkupTagHelperBlock("strong",
new List<KeyValuePair<string, SyntaxTreeNode>> new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("required", null) new TagHelperAttributeNode("required", null, HtmlAttributeValueStyle.Minimized)
}, },
blockFactory.MarkupTagBlock("<strong>"), blockFactory.MarkupTagBlock("<strong>"),
blockFactory.MarkupTagBlock("</strong>"))); blockFactory.MarkupTagBlock("</strong>")));
@ -1351,9 +1352,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})) }))
}, },
{ {
@ -1362,9 +1363,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", dateTimeNow(10)) new TagHelperAttributeNode("class", dateTimeNow(10))
})) }))
}, },
{ {
@ -1372,9 +1373,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1383,9 +1384,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", dateTimeNow(10)) new TagHelperAttributeNode("class", dateTimeNow(10))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1394,9 +1395,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new SyntaxTreeNode[] children: new SyntaxTreeNode[]
{ {
@ -1413,9 +1414,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
})) }))
}, },
{ {
@ -1424,9 +1425,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", dateTimeNow(18)) new TagHelperAttributeNode("catchAll", dateTimeNow(18))
})) }))
}, },
{ {
@ -1434,9 +1435,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1445,9 +1446,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", dateTimeNow(18)) new TagHelperAttributeNode("catchAll", dateTimeNow(18))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1494,10 +1495,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("a")), new TagHelperAttributeNode("notRequired", factory.Markup("a")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})) }))
}, },
{ {
@ -1506,10 +1507,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", dateTimeNow(16)), new TagHelperAttributeNode("notRequired", dateTimeNow(16)),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})) }))
}, },
{ {
@ -1517,10 +1518,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("a")), new TagHelperAttributeNode("notRequired", factory.Markup("a")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1530,10 +1531,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})) }))
}, },
{ {
@ -1542,10 +1543,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", dateTimeNow(12)), new TagHelperAttributeNode("style", dateTimeNow(12)),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})) }))
}, },
{ {
@ -1553,10 +1554,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1565,10 +1566,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", dateTimeNow(12)), new TagHelperAttributeNode("style", dateTimeNow(12)),
new KeyValuePair<string, SyntaxTreeNode>("class", dateTimeNow(34)) new TagHelperAttributeNode("class", dateTimeNow(34))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1577,10 +1578,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new SyntaxTreeNode[] children: new SyntaxTreeNode[]
{ {
@ -1597,10 +1598,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
})) }))
}, },
{ {
@ -1608,10 +1609,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1621,11 +1622,11 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
})) }))
}, },
{ {
@ -1633,11 +1634,11 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1646,11 +1647,11 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", new TagHelperAttributeNode("catchAll",
new MarkupBlock( new MarkupBlock(
new MarkupBlock( new MarkupBlock(
factory.Markup("@").Accepts(AcceptedCharacters.None), factory.Markup("@").Accepts(AcceptedCharacters.None),
@ -1665,11 +1666,11 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", dateTimeNow(12)), new TagHelperAttributeNode("style", dateTimeNow(12)),
new KeyValuePair<string, SyntaxTreeNode>("class", dateTimeNow(34)), new TagHelperAttributeNode("class", dateTimeNow(34)),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", dateTimeNow(59)) new TagHelperAttributeNode("catchAll", dateTimeNow(59))
}, },
children: factory.Markup("words and spaces"))) children: factory.Markup("words and spaces")))
}, },
@ -1678,11 +1679,11 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"div", "div",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("style", new MarkupBlock()), new TagHelperAttributeNode("style", new MarkupBlock()),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")), new TagHelperAttributeNode("class", factory.Markup("btn")),
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new SyntaxTreeNode[] children: new SyntaxTreeNode[]
{ {
@ -1760,9 +1761,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1775,9 +1776,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new SyntaxTreeNode[] children: new SyntaxTreeNode[]
{ {
@ -1790,9 +1791,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1807,9 +1808,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new SyntaxTreeNode[] children: new SyntaxTreeNode[]
{ {
@ -1824,15 +1825,15 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new MarkupTagHelperBlock( children: new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new[] children: new[]
{ {
@ -1845,15 +1846,15 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new MarkupTagHelperBlock( children: new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1866,15 +1867,15 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new MarkupTagHelperBlock( children: new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1887,15 +1888,15 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new MarkupTagHelperBlock( children: new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new[] children: new[]
{ {
@ -1908,9 +1909,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1918,9 +1919,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
blockFactory.MarkupTagBlock("<p>"), blockFactory.MarkupTagBlock("<p>"),
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: new[] children: new[]
{ {
@ -1937,9 +1938,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new[] children: new[]
{ {
@ -1947,9 +1948,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
blockFactory.MarkupTagBlock("<strong>"), blockFactory.MarkupTagBlock("<strong>"),
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"strong", "strong",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("catchAll", factory.Markup("hi")) new TagHelperAttributeNode("catchAll", factory.Markup("hi"))
}, },
children: new[] children: new[]
{ {
@ -2017,9 +2018,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2038,10 +2039,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("hi")), new TagHelperAttributeNode("notRequired", factory.Markup("hi")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2067,9 +2068,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2084,10 +2085,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("hi")), new TagHelperAttributeNode("notRequired", factory.Markup("hi")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2101,9 +2102,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
"<p class=\"btn\" <p>", "<p class=\"btn\" <p>",
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock("p", new MarkupTagHelperBlock("p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: blockFactory.MarkupTagBlock("<p>"))), children: blockFactory.MarkupTagBlock("<p>"))),
new[] new[]
@ -2122,10 +2123,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
"<p notRequired=\"hi\" class=\"btn\" <p>", "<p notRequired=\"hi\" class=\"btn\" <p>",
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock("p", new MarkupTagHelperBlock("p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("hi")), new TagHelperAttributeNode("notRequired", factory.Markup("hi")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: blockFactory.MarkupTagBlock("<p>"))), children: blockFactory.MarkupTagBlock("<p>"))),
new[] new[]
@ -2145,9 +2146,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2166,10 +2167,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"p", "p",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("notRequired", factory.Markup("hi")), new TagHelperAttributeNode("notRequired", factory.Markup("hi")),
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
new[] new[]
{ {
@ -2370,9 +2371,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"th:myth", "th:myth",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
availableDescriptorsColon availableDescriptorsColon
}, },
@ -2382,9 +2383,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"PREFIXmyth", "PREFIXmyth",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
availableDescriptorsText availableDescriptorsText
}, },
@ -2394,9 +2395,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"th:myth2", "th:myth2",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
availableDescriptorsColon availableDescriptorsColon
}, },
@ -2406,9 +2407,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"PREFIXmyth2", "PREFIXmyth2",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
})), })),
availableDescriptorsText availableDescriptorsText
}, },
@ -2417,9 +2418,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"th:myth", "th:myth",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: factory.Markup("words and spaces"))), children: factory.Markup("words and spaces"))),
availableDescriptorsColon availableDescriptorsColon
@ -2429,9 +2430,9 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupBlock( new MarkupBlock(
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"PREFIXmyth", "PREFIXmyth",
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
new KeyValuePair<string, SyntaxTreeNode>("class", factory.Markup("btn")) new TagHelperAttributeNode("class", factory.Markup("btn"))
}, },
children: factory.Markup("words and spaces"))), children: factory.Markup("words and spaces"))),
availableDescriptorsText availableDescriptorsText
@ -2442,10 +2443,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"th:myth2", "th:myth2",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
{ {
new KeyValuePair<string, SyntaxTreeNode>( new TagHelperAttributeNode(
"bound", "bound",
new MarkupBlock( new MarkupBlock(
new MarkupBlock( new MarkupBlock(
@ -2464,10 +2465,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"PREFIXmyth2", "PREFIXmyth2",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
{ {
new KeyValuePair<string, SyntaxTreeNode>( new TagHelperAttributeNode(
"bound", "bound",
new MarkupBlock( new MarkupBlock(
new MarkupBlock( new MarkupBlock(
@ -2486,10 +2487,10 @@ namespace Microsoft.AspNetCore.Razor.Test.TagHelpers
new MarkupTagHelperBlock( new MarkupTagHelperBlock(
"PREFIXmyth2", "PREFIXmyth2",
tagMode: TagMode.SelfClosing, tagMode: TagMode.SelfClosing,
attributes: new List<KeyValuePair<string, SyntaxTreeNode>> attributes: new List<TagHelperAttributeNode>
{ {
{ {
new KeyValuePair<string, SyntaxTreeNode>( new TagHelperAttributeNode(
"bound", "bound",
new MarkupBlock( new MarkupBlock(
new MarkupBlock( new MarkupBlock(

View File

@ -14,9 +14,9 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null; private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchAll", new global::Microsoft.AspNetCore.Html.HtmlString("hi")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchAll", new global::Microsoft.AspNetCore.Html.HtmlString("hi"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
#line hidden #line hidden
@ -65,14 +65,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "checkbox"; __TestNamespace_InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 6 "AttributeTargetingTagHelpers.cshtml" #line 6 "AttributeTargetingTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(152, 40, false); Instrumentation.BeginContext(152, 40, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -91,14 +91,14 @@ __TestNamespace_InputTagHelper2.Checked = true;
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>(); __TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
__TestNamespace_InputTagHelper.Type = "checkbox"; __TestNamespace_InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 7 "AttributeTargetingTagHelpers.cshtml" #line 7 "AttributeTargetingTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(198, 54, false); Instrumentation.BeginContext(198, 54, false);

View File

@ -13,9 +13,9 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
#line hidden #line hidden
@ -65,9 +65,9 @@ namespace TestOutput
#line hidden #line hidden
WriteLiteral(" + 1"); WriteLiteral(" + 1");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer)); __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper.Type = **From custom attribute code renderer**: "text"; __TestNamespace_InputTagHelper.Type = **From custom attribute code renderer**: "text";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(190, 71, false); Instrumentation.BeginContext(190, 71, false);
@ -85,14 +85,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = **From custom attribute code renderer**: "checkbox"; __TestNamespace_InputTagHelper.Type = **From custom attribute code renderer**: "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 7 "BasicTagHelpers.cshtml" #line 7 "BasicTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = **From custom attribute code renderer**: true; __TestNamespace_InputTagHelper2.Checked = **From custom attribute code renderer**: true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(271, 39, false); Instrumentation.BeginContext(271, 39, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -14,7 +14,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
#line hidden #line hidden
@ -42,14 +42,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "checkbox"; __TestNamespace_InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 8 "BasicTagHelpers.Prefixed.cshtml" #line 8 "BasicTagHelpers.Prefixed.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(189, 41, false); Instrumentation.BeginContext(189, 41, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -14,9 +14,9 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
#line hidden #line hidden
@ -66,9 +66,9 @@ namespace TestOutput
#line hidden #line hidden
WriteLiteral(" + 1"); WriteLiteral(" + 1");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer)); __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper.Type = "text"; __TestNamespace_InputTagHelper.Type = "text";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(190, 71, false); Instrumentation.BeginContext(190, 71, false);
@ -86,14 +86,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "checkbox"; __TestNamespace_InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 7 "BasicTagHelpers.cshtml" #line 7 "BasicTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(271, 39, false); Instrumentation.BeginContext(271, 39, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -16,13 +16,13 @@ namespace TestOutput
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString("")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("Enter in a new time...")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("Enter in a new time..."), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("first value")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("first value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("second value")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("second value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("hello")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("world")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("world"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("hello")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public ComplexTagHelpers() public ComplexTagHelpers()
{ {
@ -80,7 +80,7 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "text"; __TestNamespace_InputTagHelper.Type = "text";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
@ -135,14 +135,14 @@ namespace TestOutput
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 16 "ComplexTagHelpers.cshtml" #line 16 "ComplexTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(431, 37, false); Instrumentation.BeginContext(431, 37, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -179,7 +179,7 @@ namespace TestOutput
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("tYPe", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("tYPe", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(490, 50, false); Instrumentation.BeginContext(490, 50, false);
@ -219,7 +219,7 @@ namespace TestOutput
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(558, 79, false); Instrumentation.BeginContext(558, 79, false);
@ -242,7 +242,7 @@ namespace TestOutput
); );
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>(); __TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "time", 3); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "time", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 146, "Current", 146, 7, true); AddHtmlAttributeValue("", 146, "Current", 146, 7, true);
AddHtmlAttributeValue(" ", 153, "Time:", 154, 6, true); AddHtmlAttributeValue(" ", 153, "Time:", 154, 6, true);
#line 8 "ComplexTagHelpers.cshtml" #line 8 "ComplexTagHelpers.cshtml"
@ -294,7 +294,7 @@ __TestNamespace_InputTagHelper2.Checked = (@object);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("ChecKED", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("ChecKED", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(817, 28, false); Instrumentation.BeginContext(817, 28, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -313,7 +313,7 @@ __TestNamespace_InputTagHelper2.Checked = (@object);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -345,7 +345,7 @@ __TestNamespace_InputTagHelper2.Checked = (@object);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(925, 85, false); Instrumentation.BeginContext(925, 85, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -363,7 +363,7 @@ __TestNamespace_PTagHelper.Age = -1970 + @DateTimeOffset.Now.Year;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -392,7 +392,7 @@ __TestNamespace_InputTagHelper2.Checked = DateTimeOffset.Now.Year > 2014;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(1088, 48, false); Instrumentation.BeginContext(1088, 48, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -410,7 +410,7 @@ __TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -439,7 +439,7 @@ __TestNamespace_InputTagHelper2.Checked = @( DateTimeOffset.Now.Year ) > 20
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(1216, 63, false); Instrumentation.BeginContext(1216, 63, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -457,7 +457,7 @@ __TestNamespace_PTagHelper.Age = ("My age is this long.".Length);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -486,7 +486,7 @@ __TestNamespace_PTagHelper.Age = ("My age is this long.".Length);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(1343, 26, false); Instrumentation.BeginContext(1343, 26, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -501,7 +501,7 @@ __TestNamespace_PTagHelper.Age = 123;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)

View File

@ -36,6 +36,15 @@ namespace TestOutput
#line 5 "DuplicateAttributeTagHelpers.cshtml" #line 5 "DuplicateAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default
#line hidden
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__TestNamespace_InputTagHelper.Type = "button";
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 6 "DuplicateAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>(); __TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();

View File

@ -1,4 +1,4 @@
#pragma checksum "DuplicateAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "84ecb9053de09ef4f2a69927fed3e41e188c730b" #pragma checksum "DuplicateAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b7cbc77774bfe558f4548cc5b3760f88754a329e"
namespace TestOutput namespace TestOutput
{ {
using System; using System;
@ -14,13 +14,15 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("AGE", new global::Microsoft.AspNetCore.Html.HtmlString("40")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("AGE", new global::Microsoft.AspNetCore.Html.HtmlString("40"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("Age", new global::Microsoft.AspNetCore.Html.HtmlString("500")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("Age", new global::Microsoft.AspNetCore.Html.HtmlString("500"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("TYPE", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("TYPE", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("false")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("false"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("true"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public DuplicateAttributeTagHelpers() public DuplicateAttributeTagHelpers()
{ {
@ -46,7 +48,7 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "button"; __TestNamespace_InputTagHelper.Type = "button";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
@ -65,14 +67,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "button"; __TestNamespace_InputTagHelper.Type = "button";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 5 "DuplicateAttributeTagHelpers.cshtml" #line 5 "DuplicateAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
@ -80,7 +82,35 @@ __TestNamespace_InputTagHelper2.Checked = true;
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
Instrumentation.EndContext(); Instrumentation.EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(184, 2, true); Instrumentation.BeginContext(184, 6, true);
WriteLiteral("\r\n ");
Instrumentation.EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
}
);
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "button";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 6 "DuplicateAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true;
#line default
#line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(190, 96, false);
Write(__tagHelperExecutionContext.Output);
Instrumentation.EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.End();
Instrumentation.BeginContext(286, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
Instrumentation.EndContext(); Instrumentation.EndContext();
} }
@ -92,7 +122,7 @@ __TestNamespace_PTagHelper.Age = 3;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
@ -100,7 +130,7 @@ __TestNamespace_PTagHelper.Age = 3;
{ {
await __tagHelperExecutionContext.SetOutputContentAsync(); await __tagHelperExecutionContext.SetOutputContentAsync();
} }
Instrumentation.BeginContext(33, 157, false); Instrumentation.BeginContext(33, 259, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
Instrumentation.EndContext(); Instrumentation.EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();

View File

@ -36,14 +36,14 @@ namespace TestOutput
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>(); __TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
__TestNamespace_InputTagHelper.Type = "checkbox"; __TestNamespace_InputTagHelper.Type = "checkbox";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type;
#line 3 "DuplicateTargetTagHelper.cshtml" #line 3 "DuplicateTargetTagHelper.cshtml"
__TestNamespace_InputTagHelper.Checked = true; __TestNamespace_InputTagHelper.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_CatchAllTagHelper.Checked = __TestNamespace_InputTagHelper.Checked; __TestNamespace_CatchAllTagHelper.Checked = __TestNamespace_InputTagHelper.Checked;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(33, 40, false); Instrumentation.BeginContext(33, 40, false);

View File

@ -32,7 +32,7 @@ namespace TestOutput
); );
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>(); __TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 49, "prefix", 49, 6, true); AddHtmlAttributeValue("", 49, "prefix", 49, 6, true);
#line 3 "DynamicAttributeTagHelpers.cshtml" #line 3 "DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 55, DateTime.Now, 56, 14, false); AddHtmlAttributeValue(" ", 55, DateTime.Now, 56, 14, false);
@ -53,7 +53,7 @@ AddHtmlAttributeValue(" ", 55, DateTime.Now, 56, 14, false);
); );
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>(); __TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 93, new Template(async(__razor_attribute_value_writer) => { AddHtmlAttributeValue("", 93, new Template(async(__razor_attribute_value_writer) => {
#line 5 "DynamicAttributeTagHelpers.cshtml" #line 5 "DynamicAttributeTagHelpers.cshtml"
if (true) { if (true) {
@ -114,8 +114,8 @@ WriteTo(__razor_attribute_value_writer, string.Empty);
WriteLiteral(" suffix"); WriteLiteral(" suffix");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound); __tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 204, "prefix", 204, 6, true); AddHtmlAttributeValue("", 204, "prefix", 204, 6, true);
#line 7 "DynamicAttributeTagHelpers.cshtml" #line 7 "DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 14, false); AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 14, false);
@ -180,8 +180,8 @@ AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 14, false);
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound); __tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 10 "DynamicAttributeTagHelpers.cshtml" #line 10 "DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue("", 345, long.MinValue, 345, 14, false); AddHtmlAttributeValue("", 345, long.MinValue, 345, 14, false);
@ -241,7 +241,7 @@ AddHtmlAttributeValue(" ", 404, int.MaxValue, 405, 14, false);
); );
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>(); __TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 5); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 5, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 12 "DynamicAttributeTagHelpers.cshtml" #line 12 "DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue("", 442, long.MinValue, 442, 14, false); AddHtmlAttributeValue("", 442, long.MinValue, 442, 14, false);
@ -273,7 +273,7 @@ AddHtmlAttributeValue(" ", 488, int.MaxValue, 489, 14, false);
); );
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>(); __TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 1); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 526, new Template(async(__razor_attribute_value_writer) => { AddHtmlAttributeValue("", 526, new Template(async(__razor_attribute_value_writer) => {
#line 14 "DynamicAttributeTagHelpers.cshtml" #line 14 "DynamicAttributeTagHelpers.cshtml"
if (true) { if (true) {

View File

@ -15,7 +15,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
#line hidden #line hidden
public EmptyAttributeTagHelpers() public EmptyAttributeTagHelpers()
@ -38,14 +38,14 @@ namespace TestOutput
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = ""; __TestNamespace_InputTagHelper.Type = "";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 4 "EmptyAttributeTagHelpers.cshtml" #line 4 "EmptyAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = ; __TestNamespace_InputTagHelper2.Checked = ;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(38, 34, false); Instrumentation.BeginContext(38, 34, false);
@ -67,14 +67,14 @@ __TestNamespace_InputTagHelper2.Checked = ;
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = ""; __TestNamespace_InputTagHelper.Type = "";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 6 "EmptyAttributeTagHelpers.cshtml" #line 6 "EmptyAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = ; __TestNamespace_InputTagHelper2.Checked = ;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(98, 34, false); Instrumentation.BeginContext(98, 34, false);
@ -93,7 +93,7 @@ __TestNamespace_PTagHelper.Age = ;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {

View File

@ -50,7 +50,7 @@ __TestNamespace_InputTagHelper.Value = MyEnum.MyValue;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value); __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(79, 33, false); Instrumentation.BeginContext(79, 33, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -66,7 +66,7 @@ __TestNamespace_InputTagHelper.Value = MyEnum.MyValue;
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>(); __TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 8 "EnumTagHelpers.cshtml" #line 8 "EnumTagHelpers.cshtml"
AddHtmlAttributeValue("", 128, MyEnum.MySecondValue, 128, 21, false); AddHtmlAttributeValue("", 128, MyEnum.MySecondValue, 128, 21, false);
@ -93,7 +93,7 @@ __TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Test.G
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value); __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(155, 25, false); Instrumentation.BeginContext(155, 25, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -114,13 +114,13 @@ __TestNamespace_InputTagHelper.Value = global::Microsoft.AspNetCore.Razor.Test.G
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value); __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 10 "EnumTagHelpers.cshtml" #line 10 "EnumTagHelpers.cshtml"
__TestNamespace_CatchAllTagHelper.CatchAll = global::Microsoft.AspNetCore.Razor.Test.Generator.MyEnum.MyValue; __TestNamespace_CatchAllTagHelper.CatchAll = global::Microsoft.AspNetCore.Razor.Test.Generator.MyEnum.MyValue;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll); __tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(182, 50, false); Instrumentation.BeginContext(182, 50, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -141,13 +141,13 @@ __TestNamespace_InputTagHelper.Value = enumValue;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value); __tagHelperExecutionContext.AddTagHelperAttribute("value", __TestNamespace_InputTagHelper.Value, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 11 "EnumTagHelpers.cshtml" #line 11 "EnumTagHelpers.cshtml"
__TestNamespace_CatchAllTagHelper.CatchAll = enumValue; __TestNamespace_CatchAllTagHelper.CatchAll = enumValue;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll); __tagHelperExecutionContext.AddTagHelperAttribute("catch-all", __TestNamespace_CatchAllTagHelper.CatchAll, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(234, 51, false); Instrumentation.BeginContext(234, 51, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -53,14 +53,14 @@ namespace TestOutput
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 6 "EscapedTagHelpers.cshtml" #line 6 "EscapedTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(184, 45, false); Instrumentation.BeginContext(184, 45, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -14,7 +14,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public IncompleteTagHelper() public IncompleteTagHelper()
{ {

View File

@ -15,11 +15,11 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null; private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-unbound-required"); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-unbound-required");
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-unbound-required"); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-unbound-required");
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchall-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello2")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("input-unbound-required", new global::Microsoft.AspNetCore.Html.HtmlString("hello2"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public MinimizedTagHelpers() public MinimizedTagHelpers()
{ {
@ -63,7 +63,7 @@ namespace TestOutput
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
__TestNamespace_InputTagHelper.BoundRequiredString = "hello"; __TestNamespace_InputTagHelper.BoundRequiredString = "hello";
__tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString); __tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(161, 119, false); Instrumentation.BeginContext(161, 119, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -83,9 +83,9 @@ namespace TestOutput
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
__TestNamespace_CatchAllTagHelper.BoundRequiredString = "world"; __TestNamespace_CatchAllTagHelper.BoundRequiredString = "world";
__tagHelperExecutionContext.AddTagHelperAttribute("catchall-bound-string", __TestNamespace_CatchAllTagHelper.BoundRequiredString); __tagHelperExecutionContext.AddTagHelperAttribute("catchall-bound-string", __TestNamespace_CatchAllTagHelper.BoundRequiredString, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper.BoundRequiredString = "hello2"; __TestNamespace_InputTagHelper.BoundRequiredString = "hello2";
__tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString); __tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(286, 176, false); Instrumentation.BeginContext(286, 176, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -106,7 +106,7 @@ namespace TestOutput
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__TestNamespace_InputTagHelper.BoundRequiredString = "world"; __TestNamespace_InputTagHelper.BoundRequiredString = "world";
__tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString); __tagHelperExecutionContext.AddTagHelperAttribute("input-bound-required-string", __TestNamespace_InputTagHelper.BoundRequiredString, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(468, 206, false); Instrumentation.BeginContext(468, 206, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -14,8 +14,8 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
#line hidden #line hidden
@ -66,16 +66,16 @@ namespace TestOutput
#line hidden #line hidden
WriteLiteral(" + 1"); WriteLiteral(" + 1");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer)); __tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper.Type = "text"; __TestNamespace_InputTagHelper.Type = "text";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
#line 8 "NestedScriptTagTagHelpers.cshtml" #line 8 "NestedScriptTagTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.Checked = true; __TestNamespace_InputTagHelper2.Checked = true;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked); __tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(307, 86, false); Instrumentation.BeginContext(307, 86, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -15,10 +15,10 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1 = null; private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("password")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("password"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("radio")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("radio"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("int-prefix-salt", new global::Microsoft.AspNetCore.Html.HtmlString("8")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("int-prefix-salt", new global::Microsoft.AspNetCore.Html.HtmlString("8"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public PrefixedAttributeTagHelpers() public PrefixedAttributeTagHelpers()
{ {
@ -63,14 +63,14 @@ __TestNamespace_InputTagHelper2.IntDictionaryProperty = intDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper2.IntDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper2.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty; __TestNamespace_InputTagHelper1.IntDictionaryProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty;
#line 16 "PrefixedAttributeTagHelpers.cshtml" #line 16 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.StringDictionaryProperty = stringDictionary; __TestNamespace_InputTagHelper2.StringDictionaryProperty = stringDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __TestNamespace_InputTagHelper2.StringDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __TestNamespace_InputTagHelper2.StringDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.StringDictionaryProperty = __TestNamespace_InputTagHelper2.StringDictionaryProperty; __TestNamespace_InputTagHelper1.StringDictionaryProperty = __TestNamespace_InputTagHelper2.StringDictionaryProperty;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(329, 92, false); Instrumentation.BeginContext(329, 92, false);
@ -101,21 +101,21 @@ __TestNamespace_InputTagHelper2.IntDictionaryProperty = intDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper2.IntDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper2.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty; __TestNamespace_InputTagHelper1.IntDictionaryProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty;
#line 17 "PrefixedAttributeTagHelpers.cshtml" #line 17 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = 37; __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"]; __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"];
#line 17 "PrefixedAttributeTagHelpers.cshtml" #line 17 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = 42; __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = 42;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"]; __TestNamespace_InputTagHelper1.IntProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"];
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(427, 103, false); Instrumentation.BeginContext(427, 103, false);
@ -154,28 +154,28 @@ __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = 42;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"]; __TestNamespace_InputTagHelper1.IntProperty = __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"];
#line 19 "PrefixedAttributeTagHelpers.cshtml" #line 19 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = 37; __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"]; __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"];
#line 19 "PrefixedAttributeTagHelpers.cshtml" #line 19 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = 98; __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = 98;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"]; __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"];
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
__TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = "string"; __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = "string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.StringProperty = __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"]; __TestNamespace_InputTagHelper1.StringProperty = __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"];
__TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = "another string"; __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = "another string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"]; __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"];
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
WriteLiteral("literate "); WriteLiteral("literate ");
@ -187,7 +187,7 @@ __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = 37;
WriteLiteral("?"); WriteLiteral("?");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"]; __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"];
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(536, 257, false); Instrumentation.BeginContext(536, 257, false);
@ -225,10 +225,10 @@ __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"]; __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"];
__TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = "string"; __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = "string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"]; __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"];
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(799, 60, false); Instrumentation.BeginContext(799, 60, false);

View File

@ -15,10 +15,10 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1 = null; private global::TestNamespace.InputTagHelper1 __TestNamespace_InputTagHelper1 = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("checkbox"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("password")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("password"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("radio")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("radio"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("int-prefix-salt", new global::Microsoft.AspNetCore.Html.HtmlString("8")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("int-prefix-salt", new global::Microsoft.AspNetCore.Html.HtmlString("8"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public PrefixedAttributeTagHelpers() public PrefixedAttributeTagHelpers()
{ {
@ -63,14 +63,14 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty;
#line 16 "PrefixedAttributeTagHelpers.cshtml" #line 16 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper1.StringDictionaryProperty = stringDictionary; __TestNamespace_InputTagHelper1.StringDictionaryProperty = stringDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __TestNamespace_InputTagHelper1.StringDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("string-dictionary", __TestNamespace_InputTagHelper1.StringDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.StringDictionaryProperty = __TestNamespace_InputTagHelper1.StringDictionaryProperty; __TestNamespace_InputTagHelper2.StringDictionaryProperty = __TestNamespace_InputTagHelper1.StringDictionaryProperty;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(329, 92, false); Instrumentation.BeginContext(329, 92, false);
@ -101,21 +101,21 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-dictionary", __TestNamespace_InputTagHelper1.IntDictionaryProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty; __TestNamespace_InputTagHelper2.IntDictionaryProperty = __TestNamespace_InputTagHelper1.IntDictionaryProperty;
#line 17 "PrefixedAttributeTagHelpers.cshtml" #line 17 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = 37; __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-garlic", __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"]; __TestNamespace_InputTagHelper2.IntDictionaryProperty["garlic"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["garlic"];
#line 17 "PrefixedAttributeTagHelpers.cshtml" #line 17 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper1.IntProperty = 42; __TestNamespace_InputTagHelper1.IntProperty = 42;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty;
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(427, 103, false); Instrumentation.BeginContext(427, 103, false);
@ -154,28 +154,28 @@ __TestNamespace_InputTagHelper1.IntProperty = 42;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-grabber", __TestNamespace_InputTagHelper1.IntProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty; __TestNamespace_InputTagHelper2.IntDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.IntProperty;
#line 19 "PrefixedAttributeTagHelpers.cshtml" #line 19 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = 37; __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-salt", __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"]; __TestNamespace_InputTagHelper2.IntDictionaryProperty["salt"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"];
#line 19 "PrefixedAttributeTagHelpers.cshtml" #line 19 "PrefixedAttributeTagHelpers.cshtml"
__TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = 98; __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = 98;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"]; __TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"];
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
__TestNamespace_InputTagHelper1.StringProperty = "string"; __TestNamespace_InputTagHelper1.StringProperty = "string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __TestNamespace_InputTagHelper1.StringProperty); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __TestNamespace_InputTagHelper1.StringProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.StringProperty; __TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.StringProperty;
__TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = "another string"; __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = "another string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"]; __TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"];
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
WriteLiteral("literate "); WriteLiteral("literate ");
@ -187,7 +187,7 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty["salt"] = 37;
WriteLiteral("?"); WriteLiteral("?");
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer; __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"] = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-cumin", __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"]; __TestNamespace_InputTagHelper2.StringDictionaryProperty["cumin"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["cumin"];
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(536, 257, false); Instrumentation.BeginContext(536, 257, false);
@ -225,10 +225,10 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = 37;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"]); __tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"]; __TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"];
__TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = "string"; __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = "string";
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"]); __tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"]; __TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"];
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(799, 60, false); Instrumentation.BeginContext(799, 60, false);

View File

@ -14,7 +14,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public SingleTagHelper() public SingleTagHelper()
{ {
@ -42,7 +42,7 @@ __TestNamespace_PTagHelper.Age = 1337;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {

View File

@ -14,7 +14,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public SingleTagHelperWithNewlineBeforeAttributes() public SingleTagHelperWithNewlineBeforeAttributes()
{ {
@ -42,7 +42,7 @@ __TestNamespace_PTagHelper.Age = 1337;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {

View File

@ -15,13 +15,13 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null; private global::TestNamespace.CatchAllTagHelper __TestNamespace_CatchAllTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("bound"); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("bound");
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[item]", new global::Microsoft.AspNetCore.Html.HtmlString("items")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[item]", new global::Microsoft.AspNetCore.Html.HtmlString("items"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[(item)]", new global::Microsoft.AspNetCore.Html.HtmlString("items")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[(item)]", new global::Microsoft.AspNetCore.Html.HtmlString("items"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(^click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(^click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("*something", new global::Microsoft.AspNetCore.Html.HtmlString("value")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("*something", new global::Microsoft.AspNetCore.Html.HtmlString("value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#localminimized"); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#localminimized");
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#local", new global::Microsoft.AspNetCore.Html.HtmlString("value")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#local", new global::Microsoft.AspNetCore.Html.HtmlString("value"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public SymbolBoundAttributes() public SymbolBoundAttributes()
{ {
@ -46,7 +46,7 @@ __TestNamespace_CatchAllTagHelper.ListItems = items;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("[item]", __TestNamespace_CatchAllTagHelper.ListItems); __tagHelperExecutionContext.AddTagHelperAttribute("[item]", __TestNamespace_CatchAllTagHelper.ListItems, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(276, 45, false); Instrumentation.BeginContext(276, 45, false);
@ -67,7 +67,7 @@ __TestNamespace_CatchAllTagHelper.ArrayItems = items;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __TestNamespace_CatchAllTagHelper.ArrayItems); __tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __TestNamespace_CatchAllTagHelper.ArrayItems, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(323, 49, false); Instrumentation.BeginContext(323, 49, false);
@ -91,7 +91,7 @@ __TestNamespace_CatchAllTagHelper.Event1 = doSomething();
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("(click)", __TestNamespace_CatchAllTagHelper.Event1); __tagHelperExecutionContext.AddTagHelperAttribute("(click)", __TestNamespace_CatchAllTagHelper.Event1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -119,7 +119,7 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __TestNamespace_CatchAllTagHelper.Event2); __tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __TestNamespace_CatchAllTagHelper.Event2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -143,7 +143,7 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__TestNamespace_CatchAllTagHelper.StringProperty1 = "value"; __TestNamespace_CatchAllTagHelper.StringProperty1 = "value";
__tagHelperExecutionContext.AddTagHelperAttribute("*something", __TestNamespace_CatchAllTagHelper.StringProperty1); __tagHelperExecutionContext.AddTagHelperAttribute("*something", __TestNamespace_CatchAllTagHelper.StringProperty1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -179,7 +179,7 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
__TestNamespace_CatchAllTagHelper.StringProperty2 = "value"; __TestNamespace_CatchAllTagHelper.StringProperty2 = "value";
__tagHelperExecutionContext.AddTagHelperAttribute("#local", __TestNamespace_CatchAllTagHelper.StringProperty2); __tagHelperExecutionContext.AddTagHelperAttribute("#local", __TestNamespace_CatchAllTagHelper.StringProperty2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(642, 47, false); Instrumentation.BeginContext(642, 47, false);

View File

@ -86,8 +86,8 @@ namespace TestOutput
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__TestNamespace_MyTagHelper.BoundProperty = __tagHelperStringValueBuffer; __TestNamespace_MyTagHelper.BoundProperty = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("boundproperty", __TestNamespace_MyTagHelper.BoundProperty); __tagHelperExecutionContext.AddTagHelperAttribute("boundproperty", __TestNamespace_MyTagHelper.BoundProperty, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unboundproperty", 3); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unboundproperty", 3, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 186, "Current", 186, 7, true); AddHtmlAttributeValue("", 186, "Current", 186, 7, true);
AddHtmlAttributeValue(" ", 193, "Time:", 194, 6, true); AddHtmlAttributeValue(" ", 193, "Time:", 194, 6, true);
#line 9 "TagHelpersInSection.cshtml" #line 9 "TagHelpersInSection.cshtml"

View File

@ -14,12 +14,12 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null; private global::TestNamespace.InputTagHelper __TestNamespace_InputTagHelper = null;
private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null; private global::TestNamespace.InputTagHelper2 __TestNamespace_InputTagHelper2 = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello2")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("hello2"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("blah")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("blah"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public TagHelpersWithWeirdlySpacedAttributes() public TagHelpersWithWeirdlySpacedAttributes()
{ {
@ -47,7 +47,7 @@ __TestNamespace_PTagHelper.Age = 1337;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
BeginWriteTagHelperAttribute(); BeginWriteTagHelperAttribute();
#line 7 "TagHelpersWithWeirdlySpacedAttributes.cshtml" #line 7 "TagHelpersWithWeirdlySpacedAttributes.cshtml"
Write(true); Write(true);
@ -55,7 +55,7 @@ __TestNamespace_PTagHelper.Age = 1337;
#line default #line default
#line hidden #line hidden
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute(); __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
__tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer)); __tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -76,7 +76,7 @@ __TestNamespace_PTagHelper.Age = 1337;
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "text"; __TestNamespace_InputTagHelper.Type = "text";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.SingleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
@ -97,7 +97,7 @@ __TestNamespace_PTagHelper.Age = 1234;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(173, 46, false); Instrumentation.BeginContext(173, 46, false);
@ -115,7 +115,7 @@ __TestNamespace_PTagHelper.Age = 1234;
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>(); __TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2); __tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
__TestNamespace_InputTagHelper.Type = "password"; __TestNamespace_InputTagHelper.Type = "password";
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type); __tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type; __TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

View File

@ -14,7 +14,7 @@ namespace TestOutput
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelperScopeManager __tagHelperScopeManager = null;
private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null; private global::TestNamespace.PTagHelper __TestNamespace_PTagHelper = null;
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("test")); private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("test"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line hidden #line hidden
public TransitionsInTagHelperAttributes() public TransitionsInTagHelperAttributes()
{ {
@ -44,7 +44,7 @@ namespace TestOutput
); );
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>(); __TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 107, new Template(async(__razor_attribute_value_writer) => { AddHtmlAttributeValue("", 107, new Template(async(__razor_attribute_value_writer) => {
} }
), 107, 6, false); ), 107, 6, false);
@ -54,7 +54,7 @@ __TestNamespace_PTagHelper.Age = 1337;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified) if (!__tagHelperExecutionContext.Output.IsContentModified)
{ {
@ -72,7 +72,7 @@ __TestNamespace_PTagHelper.Age = 1337;
); );
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>(); __TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 8 "TransitionsInTagHelperAttributes.cshtml" #line 8 "TransitionsInTagHelperAttributes.cshtml"
AddHtmlAttributeValue("", 153, @class, 153, 9, false); AddHtmlAttributeValue("", 153, @class, 153, 9, false);
@ -84,7 +84,7 @@ __TestNamespace_PTagHelper.Age = 42;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(143, 34, false); Instrumentation.BeginContext(143, 34, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -104,7 +104,7 @@ __TestNamespace_PTagHelper.Age = 42 + @int;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(179, 36, false); Instrumentation.BeginContext(179, 36, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -124,7 +124,7 @@ __TestNamespace_PTagHelper.Age = int;
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(217, 31, false); Instrumentation.BeginContext(217, 31, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -144,7 +144,7 @@ __TestNamespace_PTagHelper.Age = (@int);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(250, 34, false); Instrumentation.BeginContext(250, 34, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
@ -158,7 +158,7 @@ __TestNamespace_PTagHelper.Age = (@int);
); );
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>(); __TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper); __tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 2); BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 2, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 296, "custom-", 296, 7, true); AddHtmlAttributeValue("", 296, "custom-", 296, 7, true);
#line 12 "TransitionsInTagHelperAttributes.cshtml" #line 12 "TransitionsInTagHelperAttributes.cshtml"
AddHtmlAttributeValue("", 303, @class, 303, 9, false); AddHtmlAttributeValue("", 303, @class, 303, 9, false);
@ -171,7 +171,7 @@ __TestNamespace_PTagHelper.Age = 4 * @(@int + 2);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age); __tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
Instrumentation.BeginContext(286, 54, false); Instrumentation.BeginContext(286, 54, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);

View File

@ -3,4 +3,5 @@
<p age="3" AGE="40" Age="500"> <p age="3" AGE="40" Age="500">
<input type="button" TYPE="checkbox" /> <input type="button" TYPE="checkbox" />
<input type="button" checked="true" type="checkbox" checked="false" /> <input type="button" checked="true" type="checkbox" checked="false" />
<input type='button' checked="true" type=checkbox checked='true' type="checkbox" checked=true />
</p> </p>