[Fixes #915] Added TagHelper preallocated attribute optimization pass
This commit is contained in:
parent
e9a688be15
commit
eb0a2a1833
|
|
@ -332,6 +332,16 @@ namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
tagHelperVariableName);
|
tagHelperVariableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void VisitAddPreallocatedTagHelperHtmlAttribute(AddPreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
Context.Writer
|
||||||
|
.WriteStartInstanceMethodInvocation(
|
||||||
|
"__tagHelperExecutionContext" /* ORIGINAL: ExecutionContextVariableName */,
|
||||||
|
"AddHtmlAttribute" /* ORIGINAL: ExecutionContextAddHtmlAttributeMethodName */)
|
||||||
|
.Write(node.VariableName)
|
||||||
|
.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
|
||||||
internal override void VisitAddTagHelperHtmlAttribute(AddTagHelperHtmlAttributeIRNode node)
|
internal override void VisitAddTagHelperHtmlAttribute(AddTagHelperHtmlAttributeIRNode node)
|
||||||
{
|
{
|
||||||
var attributeValueStyleParameter = $"global::{typeof(HtmlAttributeValueStyle).FullName}.{node.ValueStyle}";
|
var attributeValueStyleParameter = $"global::{typeof(HtmlAttributeValueStyle).FullName}.{node.ValueStyle}";
|
||||||
|
|
@ -403,6 +413,23 @@ namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void VisitSetPreallocatedTagHelperProperty(SetPreallocatedTagHelperPropertyIRNode node)
|
||||||
|
{
|
||||||
|
var tagHelperVariableName = GetTagHelperVariableName(node.TagHelperTypeName);
|
||||||
|
var propertyValueAccessor = GetTagHelperPropertyAccessor(tagHelperVariableName, node.AttributeName, node.Descriptor);
|
||||||
|
var attributeValueAccessor = $"{node.VariableName}.Value" /* ORIGINAL: TagHelperAttributeValuePropertyName */;
|
||||||
|
Context.Writer
|
||||||
|
.WriteStartAssignment(propertyValueAccessor)
|
||||||
|
.Write("(string)")
|
||||||
|
.Write(attributeValueAccessor)
|
||||||
|
.WriteLine(";")
|
||||||
|
.WriteStartInstanceMethodInvocation(
|
||||||
|
"__tagHelperExecutionContext" /* ORIGINAL: ExecutionContextVariableName */,
|
||||||
|
"AddTagHelperAttribute" /* ORIGINAL: ExecutionContextAddTagHelperAttributeMethodName */)
|
||||||
|
.Write(node.VariableName)
|
||||||
|
.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
|
||||||
internal override void VisitSetTagHelperProperty(SetTagHelperPropertyIRNode node)
|
internal override void VisitSetTagHelperProperty(SetTagHelperPropertyIRNode node)
|
||||||
{
|
{
|
||||||
var tagHelperVariableName = GetTagHelperVariableName(node.TagHelperTypeName);
|
var tagHelperVariableName = GetTagHelperVariableName(node.TagHelperTypeName);
|
||||||
|
|
@ -545,6 +572,51 @@ namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
"End" /* ORIGINAL: ScopeManagerEndMethodName */);
|
"End" /* ORIGINAL: ScopeManagerEndMethodName */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void VisitDeclarePreallocatedTagHelperHtmlAttribute(DeclarePreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
Context.Writer
|
||||||
|
.Write("private static readonly global::")
|
||||||
|
.Write("Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute" /* ORIGINAL: TagHelperAttributeTypeName */)
|
||||||
|
.Write(" ")
|
||||||
|
.Write(node.VariableName)
|
||||||
|
.Write(" = ")
|
||||||
|
.WriteStartNewObject("global::" + "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute" /* ORIGINAL: TagHelperAttributeTypeName */)
|
||||||
|
.WriteStringLiteral(node.Name);
|
||||||
|
|
||||||
|
if (node.ValueStyle == HtmlAttributeValueStyle.Minimized)
|
||||||
|
{
|
||||||
|
Context.Writer.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Context.Writer
|
||||||
|
.WriteParameterSeparator()
|
||||||
|
.WriteStartNewObject("global::" + "Microsoft.AspNetCore.Html.HtmlString" /* ORIGINAL: EncodedHtmlStringTypeName */)
|
||||||
|
.WriteStringLiteral(node.Value)
|
||||||
|
.WriteEndMethodInvocation(endLine: false)
|
||||||
|
.WriteParameterSeparator()
|
||||||
|
.Write($"global::{typeof(HtmlAttributeValueStyle).FullName}.{node.ValueStyle}")
|
||||||
|
.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void VisitDeclarePreallocatedTagHelperAttribute(DeclarePreallocatedTagHelperAttributeIRNode node)
|
||||||
|
{
|
||||||
|
Context.Writer
|
||||||
|
.Write("private static readonly global::")
|
||||||
|
.Write("Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute" /* ORIGINAL: TagHelperAttributeTypeName */)
|
||||||
|
.Write(" ")
|
||||||
|
.Write(node.VariableName)
|
||||||
|
.Write(" = ")
|
||||||
|
.WriteStartNewObject("global::" + "Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute" /* ORIGINAL: TagHelperAttributeTypeName */)
|
||||||
|
.WriteStringLiteral(node.Name)
|
||||||
|
.WriteParameterSeparator()
|
||||||
|
.WriteStringLiteral(node.Value)
|
||||||
|
.WriteParameterSeparator()
|
||||||
|
.Write($"global::{typeof(HtmlAttributeValueStyle).FullName}.{node.ValueStyle}")
|
||||||
|
.WriteEndMethodInvocation();
|
||||||
|
}
|
||||||
|
|
||||||
internal override void VisitDeclareTagHelperFields(DeclareTagHelperFieldsIRNode node)
|
internal override void VisitDeclareTagHelperFields(DeclareTagHelperFieldsIRNode node)
|
||||||
{
|
{
|
||||||
Context.Writer.WriteLineHiddenDirective();
|
Context.Writer.WriteLineHiddenDirective();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
// 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 System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
|
{
|
||||||
|
internal class AddPreallocatedTagHelperHtmlAttributeIRNode : RazorIRNode
|
||||||
|
{
|
||||||
|
public override IList<RazorIRNode> Children { get; } = EmptyArray;
|
||||||
|
|
||||||
|
public override RazorIRNode Parent { get; set; }
|
||||||
|
|
||||||
|
internal override MappingLocation SourceRange { get; set; }
|
||||||
|
|
||||||
|
public string VariableName { get; set; }
|
||||||
|
|
||||||
|
public override void Accept(RazorIRNodeVisitor visitor)
|
||||||
|
{
|
||||||
|
visitor.VisitAddPreallocatedTagHelperHtmlAttribute(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TResult Accept<TResult>(RazorIRNodeVisitor<TResult> visitor)
|
||||||
|
{
|
||||||
|
return visitor.VisitAddPreallocatedTagHelperHtmlAttribute(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// 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 System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
|
{
|
||||||
|
internal class DeclarePreallocatedTagHelperAttributeIRNode : RazorIRNode
|
||||||
|
{
|
||||||
|
public override IList<RazorIRNode> Children { get; } = EmptyArray;
|
||||||
|
|
||||||
|
public override RazorIRNode Parent { get; set; }
|
||||||
|
|
||||||
|
internal override MappingLocation SourceRange { get; set; }
|
||||||
|
|
||||||
|
public string VariableName { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
public HtmlAttributeValueStyle ValueStyle { get; set; }
|
||||||
|
|
||||||
|
public override void Accept(RazorIRNodeVisitor visitor)
|
||||||
|
{
|
||||||
|
visitor.VisitDeclarePreallocatedTagHelperAttribute(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TResult Accept<TResult>(RazorIRNodeVisitor<TResult> visitor)
|
||||||
|
{
|
||||||
|
return visitor.VisitDeclarePreallocatedTagHelperAttribute(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
// 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 System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
|
{
|
||||||
|
internal class DeclarePreallocatedTagHelperHtmlAttributeIRNode : RazorIRNode
|
||||||
|
{
|
||||||
|
public override IList<RazorIRNode> Children { get; } = EmptyArray;
|
||||||
|
|
||||||
|
public override RazorIRNode Parent { get; set; }
|
||||||
|
|
||||||
|
internal override MappingLocation SourceRange { get; set; }
|
||||||
|
|
||||||
|
public string VariableName { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
public HtmlAttributeValueStyle ValueStyle { get; set; }
|
||||||
|
|
||||||
|
public override void Accept(RazorIRNodeVisitor visitor)
|
||||||
|
{
|
||||||
|
visitor.VisitDeclarePreallocatedTagHelperHtmlAttribute(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TResult Accept<TResult>(RazorIRNodeVisitor<TResult> visitor)
|
||||||
|
{
|
||||||
|
return visitor.VisitDeclarePreallocatedTagHelperHtmlAttribute(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -128,5 +128,25 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
{
|
{
|
||||||
VisitDefault(node);
|
VisitDefault(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal virtual void VisitDeclarePreallocatedTagHelperHtmlAttribute(DeclarePreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual void VisitAddPreallocatedTagHelperHtmlAttribute(AddPreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual void VisitDeclarePreallocatedTagHelperAttribute(DeclarePreallocatedTagHelperAttributeIRNode node)
|
||||||
|
{
|
||||||
|
VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual void VisitSetPreallocatedTagHelperProperty(SetPreallocatedTagHelperPropertyIRNode node)
|
||||||
|
{
|
||||||
|
VisitDefault(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -129,5 +129,25 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
{
|
{
|
||||||
return VisitDefault(node);
|
return VisitDefault(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal virtual TResult VisitDeclarePreallocatedTagHelperHtmlAttribute(DeclarePreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
return VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual TResult VisitAddPreallocatedTagHelperHtmlAttribute(AddPreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
return VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual TResult VisitDeclarePreallocatedTagHelperAttribute(DeclarePreallocatedTagHelperAttributeIRNode node)
|
||||||
|
{
|
||||||
|
return VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal virtual TResult VisitSetPreallocatedTagHelperProperty(SetPreallocatedTagHelperPropertyIRNode node)
|
||||||
|
{
|
||||||
|
return VisitDefault(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
// 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 System.Collections.Generic;
|
||||||
|
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
|
{
|
||||||
|
internal class SetPreallocatedTagHelperPropertyIRNode : RazorIRNode
|
||||||
|
{
|
||||||
|
public override IList<RazorIRNode> Children { get; } = EmptyArray;
|
||||||
|
|
||||||
|
public override RazorIRNode Parent { get; set; }
|
||||||
|
|
||||||
|
internal override MappingLocation SourceRange { get; set; }
|
||||||
|
|
||||||
|
public string VariableName { get; set; }
|
||||||
|
|
||||||
|
public string AttributeName { get; set; }
|
||||||
|
|
||||||
|
public string TagHelperTypeName { get; set; }
|
||||||
|
|
||||||
|
public string PropertyName { get; set; }
|
||||||
|
|
||||||
|
public TagHelperAttributeDescriptor Descriptor { get; set; }
|
||||||
|
|
||||||
|
public override void Accept(RazorIRNodeVisitor visitor)
|
||||||
|
{
|
||||||
|
visitor.VisitSetPreallocatedTagHelperProperty(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override TResult Accept<TResult>(RazorIRNodeVisitor<TResult> visitor)
|
||||||
|
{
|
||||||
|
return visitor.VisitSetPreallocatedTagHelperProperty(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -66,6 +66,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
internal static void AddRuntimeDefaults(IRazorEngineBuilder builder)
|
internal static void AddRuntimeDefaults(IRazorEngineBuilder builder)
|
||||||
{
|
{
|
||||||
builder.Phases.Add(new DefaultRazorRuntimeCSharpLoweringPhase());
|
builder.Phases.Add(new DefaultRazorRuntimeCSharpLoweringPhase());
|
||||||
|
|
||||||
|
builder.Features.Add(new RazorPreallocatedTagHelperAttributeOptimizationPass());
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void AddDesignTimeDefaults(IRazorEngineBuilder builder)
|
internal static void AddDesignTimeDefaults(IRazorEngineBuilder builder)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
// 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 System;
|
||||||
|
using System.Linq;
|
||||||
|
using Microsoft.AspNetCore.Razor.Evolution.Intermediate;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
|
{
|
||||||
|
internal class RazorPreallocatedTagHelperAttributeOptimizationPass : RazorIRPassBase
|
||||||
|
{
|
||||||
|
public override int Order => RazorIRPass.DefaultLoweringOrder;
|
||||||
|
|
||||||
|
public override DocumentIRNode ExecuteCore(RazorCodeDocument codeDocument, DocumentIRNode irDocument)
|
||||||
|
{
|
||||||
|
var walker = new PreallocatedTagHelperWalker();
|
||||||
|
walker.VisitDocument(irDocument);
|
||||||
|
|
||||||
|
return irDocument;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class PreallocatedTagHelperWalker : RazorIRNodeWalker
|
||||||
|
{
|
||||||
|
private const string PreAllocatedAttributeVariablePrefix = "__tagHelperAttribute_";
|
||||||
|
|
||||||
|
private ClassDeclarationIRNode _classDeclaration;
|
||||||
|
private int _variableCountOffset;
|
||||||
|
private int _preallocatedDeclarationCount = 0;
|
||||||
|
|
||||||
|
public override void VisitClass(ClassDeclarationIRNode node)
|
||||||
|
{
|
||||||
|
_classDeclaration = node;
|
||||||
|
_variableCountOffset = node.Children.Count;
|
||||||
|
|
||||||
|
VisitDefault(node);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void VisitAddTagHelperHtmlAttribute(AddTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
if (node.Children.Count != 1 || !(node.Children.First() is HtmlContentIRNode))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var plainTextValue = (node.Children.First() as HtmlContentIRNode).Content;
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttributeIRNode declaration = null;
|
||||||
|
|
||||||
|
for (var i = 0; i < _classDeclaration.Children.Count; i++)
|
||||||
|
{
|
||||||
|
var current = _classDeclaration.Children[i];
|
||||||
|
|
||||||
|
if (current is DeclarePreallocatedTagHelperHtmlAttributeIRNode)
|
||||||
|
{
|
||||||
|
var existingDeclaration = (DeclarePreallocatedTagHelperHtmlAttributeIRNode)current;
|
||||||
|
|
||||||
|
if (string.Equals(existingDeclaration.Name, node.Name, StringComparison.Ordinal) &&
|
||||||
|
string.Equals(existingDeclaration.Value, plainTextValue, StringComparison.Ordinal) &&
|
||||||
|
existingDeclaration.ValueStyle == node.ValueStyle)
|
||||||
|
{
|
||||||
|
declaration = existingDeclaration;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (declaration == null)
|
||||||
|
{
|
||||||
|
var variableCount = _classDeclaration.Children.Count - _variableCountOffset;
|
||||||
|
var preAllocatedAttributeVariableName = PreAllocatedAttributeVariablePrefix + variableCount;
|
||||||
|
declaration = new DeclarePreallocatedTagHelperHtmlAttributeIRNode
|
||||||
|
{
|
||||||
|
VariableName = preAllocatedAttributeVariableName,
|
||||||
|
Name = node.Name,
|
||||||
|
Value = plainTextValue,
|
||||||
|
ValueStyle = node.ValueStyle,
|
||||||
|
Parent = _classDeclaration
|
||||||
|
};
|
||||||
|
_classDeclaration.Children.Insert(_preallocatedDeclarationCount++, declaration);
|
||||||
|
}
|
||||||
|
|
||||||
|
var addPreAllocatedAttribute = new AddPreallocatedTagHelperHtmlAttributeIRNode
|
||||||
|
{
|
||||||
|
VariableName = declaration.VariableName,
|
||||||
|
Parent = node.Parent
|
||||||
|
};
|
||||||
|
|
||||||
|
var nodeIndex = node.Parent.Children.IndexOf(node);
|
||||||
|
node.Parent.Children[nodeIndex] = addPreAllocatedAttribute;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void VisitSetTagHelperProperty(SetTagHelperPropertyIRNode node)
|
||||||
|
{
|
||||||
|
if (!node.Descriptor.IsStringProperty ||
|
||||||
|
node.Children.Count != 1 ||
|
||||||
|
!(node.Children.First() is HtmlContentIRNode))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var plainTextValue = (node.Children.First() as HtmlContentIRNode).Content;
|
||||||
|
|
||||||
|
DeclarePreallocatedTagHelperAttributeIRNode declaration = null;
|
||||||
|
|
||||||
|
for (var i = 0; i < _classDeclaration.Children.Count; i++)
|
||||||
|
{
|
||||||
|
var current = _classDeclaration.Children[i];
|
||||||
|
|
||||||
|
if (current is DeclarePreallocatedTagHelperAttributeIRNode)
|
||||||
|
{
|
||||||
|
var existingDeclaration = (DeclarePreallocatedTagHelperAttributeIRNode)current;
|
||||||
|
|
||||||
|
if (string.Equals(existingDeclaration.Name, node.AttributeName, StringComparison.Ordinal) &&
|
||||||
|
string.Equals(existingDeclaration.Value, plainTextValue, StringComparison.Ordinal) &&
|
||||||
|
existingDeclaration.ValueStyle == node.ValueStyle)
|
||||||
|
{
|
||||||
|
declaration = existingDeclaration;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (declaration == null)
|
||||||
|
{
|
||||||
|
var variableCount = _classDeclaration.Children.Count - _variableCountOffset;
|
||||||
|
var preAllocatedAttributeVariableName = PreAllocatedAttributeVariablePrefix + variableCount;
|
||||||
|
declaration = new DeclarePreallocatedTagHelperAttributeIRNode
|
||||||
|
{
|
||||||
|
VariableName = preAllocatedAttributeVariableName,
|
||||||
|
Name = node.AttributeName,
|
||||||
|
Value = plainTextValue,
|
||||||
|
ValueStyle = node.ValueStyle,
|
||||||
|
Parent = _classDeclaration
|
||||||
|
};
|
||||||
|
_classDeclaration.Children.Insert(_preallocatedDeclarationCount++, declaration);
|
||||||
|
}
|
||||||
|
|
||||||
|
var setPreallocatedProperty = new SetPreallocatedTagHelperPropertyIRNode
|
||||||
|
{
|
||||||
|
VariableName = declaration.VariableName,
|
||||||
|
AttributeName = node.AttributeName,
|
||||||
|
TagHelperTypeName = node.TagHelperTypeName,
|
||||||
|
PropertyName = node.PropertyName,
|
||||||
|
Descriptor = node.Descriptor,
|
||||||
|
Parent = node.Parent
|
||||||
|
};
|
||||||
|
|
||||||
|
var nodeIndex = node.Parent.Children.IndexOf(node);
|
||||||
|
node.Parent.Children[nodeIndex] = setPreallocatedProperty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -107,11 +107,31 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
|
||||||
WriteContentNode(node, node.AttributeName, node.PropertyName, string.Format("HtmlAttributeValueStyle.{0}", node.ValueStyle));
|
WriteContentNode(node, node.AttributeName, node.PropertyName, string.Format("HtmlAttributeValueStyle.{0}", node.ValueStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void VisitDeclarePreallocatedTagHelperAttribute(DeclarePreallocatedTagHelperAttributeIRNode node)
|
||||||
|
{
|
||||||
|
WriteContentNode(node, node.VariableName, node.Name, node.Value, string.Format("HtmlAttributeValueStyle.{0}", node.ValueStyle));
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void VisitSetPreallocatedTagHelperProperty(SetPreallocatedTagHelperPropertyIRNode node)
|
||||||
|
{
|
||||||
|
WriteContentNode(node, node.VariableName, node.AttributeName, node.PropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
internal override void VisitAddTagHelperHtmlAttribute(AddTagHelperHtmlAttributeIRNode node)
|
internal override void VisitAddTagHelperHtmlAttribute(AddTagHelperHtmlAttributeIRNode node)
|
||||||
{
|
{
|
||||||
WriteContentNode(node, node.Name, string.Format("{0}.{1}", nameof(HtmlAttributeValueStyle), node.ValueStyle));
|
WriteContentNode(node, node.Name, string.Format("{0}.{1}", nameof(HtmlAttributeValueStyle), node.ValueStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal override void VisitDeclarePreallocatedTagHelperHtmlAttribute(DeclarePreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
WriteContentNode(node, node.VariableName, node.Name, node.Value, string.Format("{0}.{1}", nameof(HtmlAttributeValueStyle), node.ValueStyle));
|
||||||
|
}
|
||||||
|
|
||||||
|
internal override void VisitAddPreallocatedTagHelperHtmlAttribute(AddPreallocatedTagHelperHtmlAttributeIRNode node)
|
||||||
|
{
|
||||||
|
WriteContentNode(node, node.VariableName);
|
||||||
|
}
|
||||||
|
|
||||||
protected void WriteBasicNode(RazorIRNode node)
|
protected void WriteBasicNode(RazorIRNode node)
|
||||||
{
|
{
|
||||||
WriteIndent();
|
WriteIndent();
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
|
||||||
using Microsoft.AspNetCore.Testing.xunit;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
|
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,26 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void DeclarePreallocatedTagHelperAttribute(
|
||||||
|
RazorIRNode node,
|
||||||
|
string attributeName,
|
||||||
|
string value,
|
||||||
|
HtmlAttributeValueStyle valueStyle)
|
||||||
|
{
|
||||||
|
var declarePreallocatedTagHelperAttribute = Assert.IsType<DeclarePreallocatedTagHelperAttributeIRNode>(node);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Assert.Equal(attributeName, declarePreallocatedTagHelperAttribute.Name);
|
||||||
|
Assert.Equal(value, declarePreallocatedTagHelperAttribute.Value);
|
||||||
|
Assert.Equal(valueStyle, declarePreallocatedTagHelperAttribute.ValueStyle);
|
||||||
|
}
|
||||||
|
catch (XunitException e)
|
||||||
|
{
|
||||||
|
throw new IRAssertException(declarePreallocatedTagHelperAttribute, e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static void TagHelperStructure(string tagName, TagMode tagMode, RazorIRNode node)
|
internal static void TagHelperStructure(string tagName, TagMode tagMode, RazorIRNode node)
|
||||||
{
|
{
|
||||||
var tagHelperStructureNode = Assert.IsType<InitializeTagHelperStructureIRNode>(node);
|
var tagHelperStructureNode = Assert.IsType<InitializeTagHelperStructureIRNode>(node);
|
||||||
|
|
@ -238,6 +258,21 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void SetPreallocatedTagHelperProperty(RazorIRNode node, string attributeName, string propertyName)
|
||||||
|
{
|
||||||
|
var setPreallocatedTagHelperProperty = Assert.IsType<SetPreallocatedTagHelperPropertyIRNode>(node);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Assert.Equal(attributeName, setPreallocatedTagHelperProperty.AttributeName);
|
||||||
|
Assert.Equal(propertyName, setPreallocatedTagHelperProperty.PropertyName);
|
||||||
|
}
|
||||||
|
catch (XunitException e)
|
||||||
|
{
|
||||||
|
throw new IRAssertException(setPreallocatedTagHelperProperty, e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static void SetTagHelperProperty(
|
internal static void SetTagHelperProperty(
|
||||||
string name,
|
string name,
|
||||||
string propertyName,
|
string propertyName,
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution
|
||||||
feature => Assert.IsType<HtmlNodeOptimizationPass>(feature),
|
feature => Assert.IsType<HtmlNodeOptimizationPass>(feature),
|
||||||
feature => Assert.IsType<TagHelperBinderSyntaxTreePass>(feature),
|
feature => Assert.IsType<TagHelperBinderSyntaxTreePass>(feature),
|
||||||
feature => Assert.IsType<DefaultDocumentClassifier>(feature),
|
feature => Assert.IsType<DefaultDocumentClassifier>(feature),
|
||||||
feature => Assert.IsType<DefaultDirectiveIRPass>(feature));
|
feature => Assert.IsType<DefaultDirectiveIRPass>(feature),
|
||||||
|
feature => Assert.IsType<RazorPreallocatedTagHelperAttributeOptimizationPass>(feature));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AssertDefaultRuntimePhases(IReadOnlyList<IRazorEnginePhase> phases)
|
private static void AssertDefaultRuntimePhases(IReadOnlyList<IRazorEnginePhase> phases)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_AttributeTargetingTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("catchAll", new global::Microsoft.AspNetCore.Html.HtmlString("hi"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("btn"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -40,10 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("hi");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("catchAll", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -59,12 +59,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml"
|
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
|
|
@ -88,22 +86,17 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml"
|
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("hi");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("catchAll", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -116,10 +109,7 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("btn");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Prefixed_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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("Hello World"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -40,12 +42,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml"
|
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
|
|
@ -64,10 +64,7 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
WriteLiteral("Hello World");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_BasicTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data", new global::Microsoft.AspNetCore.Html.HtmlString("-delay1000"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("Hello World"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -38,10 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("-delay1000");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -67,12 +69,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
WriteLiteral(" + 1");
|
WriteLiteral(" + 1");
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
WriteLiteral("text");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -88,12 +88,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_2.Value;
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_2.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_2);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml"
|
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
|
|
@ -112,14 +110,8 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
WriteLiteral("Hello World");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("1000");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-delay", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,14 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_ComplexTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", new global::Microsoft.AspNetCore.Html.HtmlString(""), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("Enter in a new time..."), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("first value"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("second value"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("hello"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("unbound", new global::Microsoft.AspNetCore.Html.HtmlString("world"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("hello"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -60,19 +68,12 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("text");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("value", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("Enter in a new time...");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("placeholder", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -268,20 +269,14 @@ __TestNamespace_InputTagHelper2.Checked = (@object);
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
WriteLiteral("first value");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml"
|
#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
|
__TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
|
||||||
WriteLiteral("second value");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -299,14 +294,8 @@ __TestNamespace_PTagHelper.Age = DateTimeOffset.Now.Year - 1970;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
|
||||||
WriteLiteral("hello");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("world");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml"
|
#line 26 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = (DateTimeOffset.Now.Year > 2014);
|
__TestNamespace_InputTagHelper2.Checked = (DateTimeOffset.Now.Year > 2014);
|
||||||
|
|
||||||
|
|
@ -454,10 +443,7 @@ __TestNamespace_PTagHelper.Age = 123;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
|
||||||
WriteLiteral("hello");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,15 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateAttributeTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "button", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("checkbox"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("checkbox"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("checked", new global::Microsoft.AspNetCore.Html.HtmlString("false"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "button", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
|
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.Evolution.Legacy.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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("AGE", new global::Microsoft.AspNetCore.Html.HtmlString("40"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("Age", new global::Microsoft.AspNetCore.Html.HtmlString("500"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -40,16 +49,11 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("button");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("checkbox");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("TYPE", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -65,26 +69,18 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("button");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml"
|
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("false");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("checked", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -100,34 +96,20 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_4.Value;
|
||||||
WriteLiteral("button");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_4.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml"
|
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("true");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("checked", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("checkbox");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("true");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("checked", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -146,14 +128,8 @@ __TestNamespace_PTagHelper.Age = 3;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
|
||||||
WriteLiteral("40");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("AGE", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("500");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("Age", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_DuplicateTargetTagHelper_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -41,14 +42,14 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
||||||
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
__TestNamespace_CatchAllTagHelper = CreateTagHelper<global::TestNamespace.CatchAllTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("checkbox");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__TestNamespace_CatchAllTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __TestNamespace_InputTagHelper.Type;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type;
|
__TestNamespace_CatchAllTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_CatchAllTagHelper.Type = __TestNamespace_InputTagHelper.Type;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml"
|
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml"
|
||||||
__TestNamespace_InputTagHelper.Checked = true;
|
__TestNamespace_InputTagHelper.Checked = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_EmptyAttributeTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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(""), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -38,20 +40,17 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml"
|
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = ;
|
__TestNamespace_InputTagHelper2.Checked = ;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -69,20 +68,17 @@ __TestNamespace_InputTagHelper2.Checked = ;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml"
|
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = ;
|
__TestNamespace_InputTagHelper2.Checked = ;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("checked", __TestNamespace_InputTagHelper2.Checked, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteTagHelper_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_IncompleteTagHelper_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -34,9 +35,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedScriptTagTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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("Hello World"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-delay", new global::Microsoft.AspNetCore.Html.HtmlString("1000"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -57,12 +60,10 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
WriteLiteral(" + 1");
|
WriteLiteral(" + 1");
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute("data-interval", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("text");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_0.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml"
|
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper2.Checked = true;
|
__TestNamespace_InputTagHelper2.Checked = true;
|
||||||
|
|
||||||
|
|
@ -88,14 +89,8 @@ __TestNamespace_InputTagHelper2.Checked = true;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
WriteLiteral("Hello World");
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("1000");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-delay", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_NestedTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "Hello", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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("text"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
|
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("foo"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -54,15 +57,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__InputTagHelper);
|
__tagHelperExecutionContext.Add(__InputTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__InputTagHelper.FooProp = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("Hello");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__InputTagHelper.FooProp = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("value", __InputTagHelper.FooProp, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("text");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -75,10 +72,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__DivTagHelper = CreateTagHelper<global::DivTagHelper>();
|
__DivTagHelper = CreateTagHelper<global::DivTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__DivTagHelper);
|
__tagHelperExecutionContext.Add(__DivTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("foo");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("unbound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,13 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_PrefixedAttributeTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.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"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-grabber", "string", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-paprika", "another string", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("string-prefix-thyme", "string", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -53,10 +60,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("checkbox");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
#line 16 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
|
__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
|
||||||
|
|
||||||
|
|
@ -86,10 +90,7 @@ __TestNamespace_InputTagHelper1.StringDictionaryProperty = stringDictionary;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
WriteLiteral("password");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
#line 17 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
|
__TestNamespace_InputTagHelper1.IntDictionaryProperty = intDictionary;
|
||||||
|
|
||||||
|
|
@ -130,10 +131,7 @@ __TestNamespace_InputTagHelper1.IntProperty = 42;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper1);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("radio");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
#line 19 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
||||||
__TestNamespace_InputTagHelper1.IntProperty = 42;
|
__TestNamespace_InputTagHelper1.IntProperty = 42;
|
||||||
|
|
||||||
|
|
@ -159,26 +157,19 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"] = 98;
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-pepper", __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
__TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"];
|
__TestNamespace_InputTagHelper2.IntDictionaryProperty["pepper"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["pepper"];
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
WriteLiteral("8");
|
__TestNamespace_InputTagHelper1.StringProperty = (string)__tagHelperAttribute_4.Value;
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("int-prefix-salt", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = (string)__tagHelperAttribute_4.Value;
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
WriteLiteral("string");
|
__TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = (string)__tagHelperAttribute_5.Value;
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
|
||||||
__TestNamespace_InputTagHelper1.StringProperty = __tagHelperStringValueBuffer;
|
__TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = (string)__tagHelperAttribute_5.Value;
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-grabber", __TestNamespace_InputTagHelper1.StringProperty, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_5);
|
||||||
if (__TestNamespace_InputTagHelper2.StringDictionaryProperty == null)
|
if (__TestNamespace_InputTagHelper1.StringDictionaryProperty == null)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-grabber", "TestNamespace.InputTagHelper2", "StringDictionaryProperty"));
|
throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-cumin", "TestNamespace.InputTagHelper1", "StringDictionaryProperty"));
|
||||||
}
|
}
|
||||||
__TestNamespace_InputTagHelper2.StringDictionaryProperty["grabber"] = __TestNamespace_InputTagHelper1.StringProperty;
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("another string");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"] = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-paprika", __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.StringDictionaryProperty["paprika"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["paprika"];
|
|
||||||
BeginWriteTagHelperAttribute();
|
BeginWriteTagHelperAttribute();
|
||||||
WriteLiteral("literate ");
|
WriteLiteral("literate ");
|
||||||
#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
#line 21 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml"
|
||||||
|
|
@ -217,16 +208,10 @@ __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"] = 37;
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("int-prefix-value", __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
__TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"];
|
__TestNamespace_InputTagHelper2.IntDictionaryProperty["value"] = __TestNamespace_InputTagHelper1.IntDictionaryProperty["value"];
|
||||||
if (__TestNamespace_InputTagHelper1.StringDictionaryProperty == null)
|
__TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = (string)__tagHelperAttribute_6.Value;
|
||||||
{
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
|
||||||
throw new InvalidOperationException(FormatInvalidIndexerAssignment("string-prefix-thyme", "TestNamespace.InputTagHelper1", "StringDictionaryProperty"));
|
__TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = (string)__tagHelperAttribute_6.Value;
|
||||||
}
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("string");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"] = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("string-prefix-thyme", __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"], global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
__TestNamespace_InputTagHelper2.StringDictionaryProperty["thyme"] = __TestNamespace_InputTagHelper1.StringDictionaryProperty["thyme"];
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SimpleTagHelpers_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "Hello", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
|
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("text"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -34,15 +36,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
__InputTagHelper = CreateTagHelper<global::InputTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__InputTagHelper);
|
__tagHelperExecutionContext.Add(__InputTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__InputTagHelper.FooProp = (string)__tagHelperAttribute_0.Value;
|
||||||
WriteLiteral("Hello");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_0);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
__InputTagHelper.FooProp = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("value", __InputTagHelper.FooProp, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("text");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelperWithNewlineBeforeAttributes_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -35,10 +36,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("Hello World");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml"
|
#line 4 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = 1337;
|
__TestNamespace_PTagHelper.Age = 1337;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SingleTagHelper_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -35,10 +36,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("Hello World");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml"
|
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = 1337;
|
__TestNamespace_PTagHelper.Age = 1337;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,14 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_SymbolBoundAttributes_Runtime
|
||||||
{
|
{
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("[item]", new global::Microsoft.AspNetCore.Html.HtmlString("items"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("(click)", new global::Microsoft.AspNetCore.Html.HtmlString("doSomething()"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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()"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("*something", "value", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.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"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("#local", "value", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -43,10 +51,7 @@ __TestNamespace_CatchAllTagHelper.ListItems = items;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("[item]", __TestNamespace_CatchAllTagHelper.ListItems, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("[item]", __TestNamespace_CatchAllTagHelper.ListItems, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("items");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("[item]", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -69,10 +74,7 @@ __TestNamespace_CatchAllTagHelper.ArrayItems = items;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __TestNamespace_CatchAllTagHelper.ArrayItems, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("[(item)]", __TestNamespace_CatchAllTagHelper.ArrayItems, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
|
||||||
WriteLiteral("items");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("[(item)]", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -96,10 +98,7 @@ __TestNamespace_CatchAllTagHelper.Event1 = doSomething();
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("(click)", __TestNamespace_CatchAllTagHelper.Event1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("(click)", __TestNamespace_CatchAllTagHelper.Event1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
WriteLiteral("doSomething()");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("(click)", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -123,10 +122,7 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __TestNamespace_CatchAllTagHelper.Event2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("(^click)", __TestNamespace_CatchAllTagHelper.Event2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
WriteLiteral("doSomething()");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("(^click)", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -144,15 +140,9 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
|
||||||
BeginWriteTagHelperAttribute();
|
BeginWriteTagHelperAttribute();
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.Minimized);
|
__tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.Minimized);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_CatchAllTagHelper.StringProperty1 = (string)__tagHelperAttribute_4.Value;
|
||||||
WriteLiteral("value");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
|
||||||
__TestNamespace_CatchAllTagHelper.StringProperty1 = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("*something", __TestNamespace_CatchAllTagHelper.StringProperty1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("value");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("*something", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -188,15 +178,9 @@ __TestNamespace_CatchAllTagHelper.Event2 = doSomething();
|
||||||
BeginWriteTagHelperAttribute();
|
BeginWriteTagHelperAttribute();
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.Minimized);
|
__tagHelperExecutionContext.AddHtmlAttribute("bound", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.Minimized);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_CatchAllTagHelper.StringProperty2 = (string)__tagHelperAttribute_6.Value;
|
||||||
WriteLiteral("value");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_7);
|
||||||
__TestNamespace_CatchAllTagHelper.StringProperty2 = __tagHelperStringValueBuffer;
|
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("#local", __TestNamespace_CatchAllTagHelper.StringProperty2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("value");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("#local", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithBoundAttributes_Runtime
|
||||||
{
|
{
|
||||||
|
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("text"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -43,10 +44,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
||||||
__InputTagHelper.BoundProp = __tagHelperStringValueBuffer;
|
__InputTagHelper.BoundProp = __tagHelperStringValueBuffer;
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.BoundProp, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __InputTagHelper.BoundProp, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("text");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("type", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TagHelpersWithWeirdlySpacedAttributes_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
|
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("hello"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
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("hello2"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "password", global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
|
private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-content", new global::Microsoft.AspNetCore.Html.HtmlString("blah"), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -37,10 +43,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("Hello World");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml"
|
#line 6 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = 1337;
|
__TestNamespace_PTagHelper.Age = 1337;
|
||||||
|
|
||||||
|
|
@ -70,16 +73,11 @@ __TestNamespace_PTagHelper.Age = 1337;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
WriteLiteral("text");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_1.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("hello");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -99,10 +97,7 @@ __TestNamespace_PTagHelper.Age = 1234;
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddTagHelperAttribute("age", __TestNamespace_PTagHelper.Age, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
|
||||||
WriteLiteral("hello2");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.SingleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
@ -118,16 +113,11 @@ __TestNamespace_PTagHelper.Age = 1234;
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
|
||||||
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
__TestNamespace_InputTagHelper2 = CreateTagHelper<global::TestNamespace.InputTagHelper2>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper2);
|
||||||
BeginWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper.Type = (string)__tagHelperAttribute_4.Value;
|
||||||
WriteLiteral("password");
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
__TestNamespace_InputTagHelper2.Type = (string)__tagHelperAttribute_4.Value;
|
||||||
__TestNamespace_InputTagHelper.Type = __tagHelperStringValueBuffer;
|
__tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
|
||||||
__tagHelperExecutionContext.AddTagHelperAttribute("type", __TestNamespace_InputTagHelper.Type, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
|
||||||
__TestNamespace_InputTagHelper2.Type = __TestNamespace_InputTagHelper.Type;
|
|
||||||
BeginWriteTagHelperAttribute();
|
|
||||||
WriteLiteral("blah");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("data-content", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
|
||||||
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
if (!__tagHelperExecutionContext.Output.IsContentModified)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TransitionsInTagHelperAttributes_Runtime
|
public class TestFiles_IntegrationTests_CodeGenerationIntegrationTest_TransitionsInTagHelperAttributes_Runtime
|
||||||
{
|
{
|
||||||
|
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.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
||||||
#line hidden
|
#line hidden
|
||||||
#pragma warning disable 0414
|
#pragma warning disable 0414
|
||||||
private string __tagHelperStringValueBuffer = null;
|
private string __tagHelperStringValueBuffer = null;
|
||||||
|
|
@ -93,10 +94,7 @@ __TestNamespace_PTagHelper.Age = 42;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("test");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
#line 9 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = 42 + @int;
|
__TestNamespace_PTagHelper.Age = 42 + @int;
|
||||||
|
|
||||||
|
|
@ -116,10 +114,7 @@ __TestNamespace_PTagHelper.Age = 42 + @int;
|
||||||
);
|
);
|
||||||
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
|
||||||
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("test");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = int;
|
__TestNamespace_PTagHelper.Age = int;
|
||||||
|
|
||||||
|
|
@ -139,10 +134,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);
|
||||||
BeginWriteTagHelperAttribute();
|
__tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
|
||||||
WriteLiteral("test");
|
|
||||||
__tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
|
|
||||||
__tagHelperExecutionContext.AddHtmlAttribute("class", Html.Raw(__tagHelperStringValueBuffer), global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
|
|
||||||
#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
#line 11 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
|
||||||
__TestNamespace_PTagHelper.Age = (@int);
|
__TestNamespace_PTagHelper.Age = (@int);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ Document -
|
||||||
UsingStatement - - System
|
UsingStatement - - System
|
||||||
UsingStatement - - System.Threading.Tasks
|
UsingStatement - - System.Threading.Tasks
|
||||||
ClassDeclaration - - - - -
|
ClassDeclaration - - - - -
|
||||||
|
DeclarePreallocatedTagHelperAttribute - - __tagHelperAttribute_0 - value - Hello - HtmlAttributeValueStyle.DoubleQuotes
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2 - unbound - foo - HtmlAttributeValueStyle.DoubleQuotes
|
||||||
DeclareTagHelperFields - - PTagHelper - FormTagHelper - InputTagHelper
|
DeclareTagHelperFields - - PTagHelper - FormTagHelper - InputTagHelper
|
||||||
RazorMethodDeclaration - - - - -
|
RazorMethodDeclaration - - - - -
|
||||||
TagHelper -
|
TagHelper -
|
||||||
|
|
@ -19,13 +22,10 @@ Document -
|
||||||
TagHelper -
|
TagHelper -
|
||||||
InitializeTagHelperStructure - - input - TagMode.SelfClosing
|
InitializeTagHelperStructure - - input - TagMode.SelfClosing
|
||||||
CreateTagHelper - - InputTagHelper
|
CreateTagHelper - - InputTagHelper
|
||||||
SetTagHelperProperty - (92:3,17 [5] NestedTagHelpers.cshtml) - value - FooProp - HtmlAttributeValueStyle.DoubleQuotes
|
SetPreallocatedTagHelperProperty - - __tagHelperAttribute_0 - value - FooProp
|
||||||
HtmlContent - (92:3,17 [5] NestedTagHelpers.cshtml) - Hello
|
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1
|
||||||
AddTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes
|
|
||||||
HtmlContent - (104:3,29 [4] NestedTagHelpers.cshtml) - text
|
|
||||||
ExecuteTagHelpers -
|
ExecuteTagHelpers -
|
||||||
HtmlContent - (112:3,37 [2] NestedTagHelpers.cshtml) - \n
|
HtmlContent - (112:3,37 [2] NestedTagHelpers.cshtml) - \n
|
||||||
CreateTagHelper - - FormTagHelper
|
CreateTagHelper - - FormTagHelper
|
||||||
AddTagHelperHtmlAttribute - - unbound - HtmlAttributeValueStyle.DoubleQuotes
|
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_2
|
||||||
HtmlContent - (68:2,15 [3] NestedTagHelpers.cshtml) - foo
|
|
||||||
ExecuteTagHelpers -
|
ExecuteTagHelpers -
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,15 @@ Document -
|
||||||
UsingStatement - - System
|
UsingStatement - - System
|
||||||
UsingStatement - - System.Threading.Tasks
|
UsingStatement - - System.Threading.Tasks
|
||||||
ClassDeclaration - - - - -
|
ClassDeclaration - - - - -
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - value - Hello - HtmlAttributeValueStyle.SingleQuotes
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1 - type - text - HtmlAttributeValueStyle.SingleQuotes
|
||||||
DeclareTagHelperFields - - InputTagHelper
|
DeclareTagHelperFields - - InputTagHelper
|
||||||
RazorMethodDeclaration - - - - -
|
RazorMethodDeclaration - - - - -
|
||||||
HtmlContent - (31:1,0 [25] SimpleTagHelpers.cshtml) - <p>Hola</p>\n<form>\n
|
HtmlContent - (31:1,0 [25] SimpleTagHelpers.cshtml) - <p>Hola</p>\n<form>\n
|
||||||
TagHelper -
|
TagHelper -
|
||||||
InitializeTagHelperStructure - - input - TagMode.SelfClosing
|
InitializeTagHelperStructure - - input - TagMode.SelfClosing
|
||||||
CreateTagHelper - - InputTagHelper
|
CreateTagHelper - - InputTagHelper
|
||||||
AddTagHelperHtmlAttribute - - value - HtmlAttributeValueStyle.SingleQuotes
|
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0
|
||||||
HtmlContent - (70:3,18 [5] SimpleTagHelpers.cshtml) - Hello
|
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_1
|
||||||
AddTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes
|
|
||||||
HtmlContent - (83:3,31 [4] SimpleTagHelpers.cshtml) - text
|
|
||||||
ExecuteTagHelpers -
|
ExecuteTagHelpers -
|
||||||
HtmlContent - (91:3,39 [9] SimpleTagHelpers.cshtml) - \n</form>
|
HtmlContent - (91:3,39 [9] SimpleTagHelpers.cshtml) - \n</form>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ Document -
|
||||||
UsingStatement - - System
|
UsingStatement - - System
|
||||||
UsingStatement - - System.Threading.Tasks
|
UsingStatement - - System.Threading.Tasks
|
||||||
ClassDeclaration - - - - -
|
ClassDeclaration - - - - -
|
||||||
|
DeclarePreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0 - type - text - HtmlAttributeValueStyle.SingleQuotes
|
||||||
DeclareTagHelperFields - - InputTagHelper
|
DeclareTagHelperFields - - InputTagHelper
|
||||||
RazorMethodDeclaration - - - - -
|
RazorMethodDeclaration - - - - -
|
||||||
HtmlContent - (31:1,0 [12] TagHelpersWithBoundAttributes.cshtml) - <form>\n
|
HtmlContent - (31:1,0 [12] TagHelpersWithBoundAttributes.cshtml) - <form>\n
|
||||||
|
|
@ -13,7 +14,6 @@ Document -
|
||||||
SetTagHelperProperty - (56:2,17 [6] TagHelpersWithBoundAttributes.cshtml) - bound - FooProp - HtmlAttributeValueStyle.DoubleQuotes
|
SetTagHelperProperty - (56:2,17 [6] TagHelpersWithBoundAttributes.cshtml) - bound - FooProp - HtmlAttributeValueStyle.DoubleQuotes
|
||||||
CSharpExpression - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml)
|
CSharpExpression - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml)
|
||||||
CSharpToken - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) - Hello
|
CSharpToken - (57:2,18 [5] TagHelpersWithBoundAttributes.cshtml) - Hello
|
||||||
AddTagHelperHtmlAttribute - - type - HtmlAttributeValueStyle.SingleQuotes
|
AddPreallocatedTagHelperHtmlAttribute - - __tagHelperAttribute_0
|
||||||
HtmlContent - (69:2,30 [4] TagHelpersWithBoundAttributes.cshtml) - text
|
|
||||||
ExecuteTagHelpers -
|
ExecuteTagHelpers -
|
||||||
HtmlContent - (77:2,38 [9] TagHelpersWithBoundAttributes.cshtml) - \n</form>
|
HtmlContent - (77:2,38 [9] TagHelpersWithBoundAttributes.cshtml) - \n</form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue