Add support for TagHelper directives

This commit adds support to the TagHelperBinderSyntaxTreePass to interpret
@addTagHelper, @removeTagHelper, and @tagHelperPrefix.

I also ported all the original tests for this feature and updated them to
call new APIs.

The bulk of the changes here were updates to baseline tests that weren't
correctly using @addTagHelper
This commit is contained in:
Ryan Nowak 2017-01-19 13:24:09 -08:00
parent c31475af4e
commit 851dd7ba3b
71 changed files with 1633 additions and 386 deletions

View File

@ -10,14 +10,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Legacy
/// </summary>
internal interface ITagHelperDescriptorResolver
{
/// <summary>
/// Resolves <see cref="TagHelperDescriptor"/>s based on the given <paramref name="resolutionContext"/>.
/// </summary>
/// <param name="resolutionContext">
/// <see cref="TagHelperDescriptorResolutionContext"/> used to resolve descriptors for the Razor page.
/// </param>
/// <returns>An <see cref="IEnumerable{TagHelperDescriptor}"/> of <see cref="TagHelperDescriptor"/>s based
/// on the given <paramref name="resolutionContext"/>.</returns>
IEnumerable<TagHelperDescriptor> Resolve(TagHelperDescriptorResolutionContext resolutionContext);
IEnumerable<TagHelperDescriptor> Resolve(ErrorSink errorSink);
}
}

View File

@ -1,54 +0,0 @@
// 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.Collections.Generic;
namespace Microsoft.AspNetCore.Razor.Evolution.Legacy
{
/// <summary>
/// Contains information needed to resolve <see cref="TagHelperDescriptor"/>s.
/// </summary>
internal class TagHelperDescriptorResolutionContext
{
// Internal for testing purposes
internal TagHelperDescriptorResolutionContext(IEnumerable<TagHelperDirectiveDescriptor> directiveDescriptors)
: this(directiveDescriptors, new ErrorSink())
{
}
/// <summary>
/// Instantiates a new instance of <see cref="TagHelperDescriptorResolutionContext"/>.
/// </summary>
/// <param name="directiveDescriptors"><see cref="TagHelperDirectiveDescriptor"/>s used to resolve
/// <see cref="TagHelperDescriptor"/>s.</param>
/// <param name="errorSink">Used to aggregate <see cref="RazorError"/>s.</param>
public TagHelperDescriptorResolutionContext(
IEnumerable<TagHelperDirectiveDescriptor> directiveDescriptors,
ErrorSink errorSink)
{
if (directiveDescriptors == null)
{
throw new ArgumentNullException(nameof(directiveDescriptors));
}
if (errorSink == null)
{
throw new ArgumentNullException(nameof(errorSink));
}
DirectiveDescriptors = new List<TagHelperDirectiveDescriptor>(directiveDescriptors);
ErrorSink = errorSink;
}
/// <summary>
/// <see cref="TagHelperDirectiveDescriptor"/>s used to resolve <see cref="TagHelperDescriptor"/>s.
/// </summary>
public IList<TagHelperDirectiveDescriptor> DirectiveDescriptors { get; private set; }
/// <summary>
/// Used to aggregate <see cref="RazorError"/>s.
/// </summary>
public ErrorSink ErrorSink { get; private set; }
}
}

View File

@ -26,6 +26,38 @@ namespace Microsoft.AspNetCore.Razor.Evolution
return string.Format(CultureInfo.CurrentCulture, GetString("FeatureDependencyMissing"), p0, p1, p2);
}
/// <summary>
/// Invalid tag helper directive look up text '{0}'. The correct look up text format is: "typeName, assemblyName".
/// </summary>
internal static string InvalidTagHelperLookupText
{
get { return GetString("InvalidTagHelperLookupText"); }
}
/// <summary>
/// Invalid tag helper directive look up text '{0}'. The correct look up text format is: "typeName, assemblyName".
/// </summary>
internal static string FormatInvalidTagHelperLookupText(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("InvalidTagHelperLookupText"), p0);
}
/// <summary>
/// Invalid tag helper directive '{0}' value. '{1}' is not allowed in prefix '{2}'.
/// </summary>
internal static string InvalidTagHelperPrefixValue
{
get { return GetString("InvalidTagHelperPrefixValue"); }
}
/// <summary>
/// Invalid tag helper directive '{0}' value. '{1}' is not allowed in prefix '{2}'.
/// </summary>
internal static string FormatInvalidTagHelperPrefixValue(object p0, object p1, object p2)
{
return string.Format(CultureInfo.CurrentCulture, GetString("InvalidTagHelperPrefixValue"), p0, p1, p2);
}
/// <summary>
/// The '{0}' operation is not valid when the builder is empty.
/// </summary>
@ -90,6 +122,38 @@ namespace Microsoft.AspNetCore.Razor.Evolution
return string.Format(CultureInfo.CurrentCulture, GetString("PhaseMustBeInitialized"), p0);
}
/// <summary>
/// Tag helper directive assembly name cannot be null or empty.
/// </summary>
internal static string TagHelperAssemblyNameCannotBeEmptyOrNull
{
get { return GetString("TagHelperAssemblyNameCannotBeEmptyOrNull"); }
}
/// <summary>
/// Tag helper directive assembly name cannot be null or empty.
/// </summary>
internal static string FormatTagHelperAssemblyNameCannotBeEmptyOrNull()
{
return GetString("TagHelperAssemblyNameCannotBeEmptyOrNull");
}
/// <summary>
/// The assembly '{0}' could not be resolved or contains no tag helpers.
/// </summary>
internal static string TagHelperAssemblyCouldNotBeResolved
{
get { return GetString("TagHelperAssemblyCouldNotBeResolved"); }
}
/// <summary>
/// The assembly '{0}' could not be resolved or contains no tag helpers.
/// </summary>
internal static string FormatTagHelperAssemblyCouldNotBeResolved(object p0)
{
return string.Format(CultureInfo.CurrentCulture, GetString("TagHelperAssemblyCouldNotBeResolved"), p0);
}
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name);

View File

@ -120,6 +120,12 @@
<data name="FeatureDependencyMissing" xml:space="preserve">
<value>The '{0}' feature requires a '{1}' provided by the '{2}'.</value>
</data>
<data name="InvalidTagHelperLookupText" xml:space="preserve">
<value>Invalid tag helper directive look up text '{0}'. The correct look up text format is: "typeName, assemblyName".</value>
</data>
<data name="InvalidTagHelperPrefixValue" xml:space="preserve">
<value>Invalid tag helper directive '{0}' value. '{1}' is not allowed in prefix '{2}'.</value>
</data>
<data name="IRBuilder_PopInvalid" xml:space="preserve">
<value>The '{0}' operation is not valid when the builder is empty.</value>
</data>
@ -132,4 +138,10 @@
<data name="PhaseMustBeInitialized" xml:space="preserve">
<value>The phase must be initialized by setting the '{0}' property.</value>
</data>
<data name="TagHelperAssemblyNameCannotBeEmptyOrNull" xml:space="preserve">
<value>Tag helper directive assembly name cannot be null or empty.</value>
</data>
<data name="TagHelperAssemblyCouldNotBeResolved" xml:space="preserve">
<value>The assembly '{0}' could not be resolved or contains no tag helpers.</value>
</data>
</root>

View File

@ -4,13 +4,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
namespace Microsoft.AspNetCore.Razor.Evolution
{
internal class TagHelperBinderSyntaxTreePass : IRazorSyntaxTreePass
{
private static HashSet<char> InvalidNonWhitespaceNameCharacters = new HashSet<char>(new[]
{
'@', '!', '<', '/', '?', '[', '>', ']', '=', '"', '\'', '*'
});
public RazorEngine Engine { get; set; }
public int Order => 150;
@ -28,7 +32,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution
//
// The imports come logically before the main razor file and are in the order they
// should be processed.
var visitor = new Visitor();
var visitor = new DirectiveVisitor();
var imports = codeDocument.GetImportSyntaxTrees();
if (imports != null)
{
@ -41,10 +45,13 @@ namespace Microsoft.AspNetCore.Razor.Evolution
visitor.VisitBlock(syntaxTree.Root);
var directives = visitor.Directives;
var errorSink = new ErrorSink();
var descriptors = resolver.Resolve(new TagHelperDescriptorResolutionContext(directives, errorSink)).ToArray();
if (descriptors.Length == 0)
var directives = visitor.Directives;
var descriptors = (IReadOnlyList<TagHelperDescriptor>)resolver.Resolve(errorSink).ToList();
descriptors = ProcessDirectives(directives, descriptors, errorSink);
if (descriptors.Count == 0)
{
// No TagHelpers, add any errors if we have them.
if (errorSink.Errors.Count > 0)
@ -70,6 +77,228 @@ namespace Microsoft.AspNetCore.Razor.Evolution
return newSyntaxTree;
}
internal IReadOnlyList<TagHelperDescriptor> ProcessDirectives(
IReadOnlyList<TagHelperDirectiveDescriptor> directives,
IReadOnlyList<TagHelperDescriptor> tagHelpers,
ErrorSink errorSink)
{
var matches = new HashSet<TagHelperDescriptor>(TagHelperDescriptorComparer.Default);
// We only support a single prefix directive.
TagHelperDirectiveDescriptor prefixDirective = null;
for (var i = 0; i < directives.Count; i++)
{
var directive = directives[i];
ParsedDirective parsed;
switch (directive.DirectiveType)
{
case TagHelperDirectiveType.AddTagHelper:
parsed = ParseAddOrRemoveDirective(directive, errorSink);
if (parsed == null)
{
// Skip this one, it's an error
break;
}
if (!AssemblyContainsTagHelpers(parsed.AssemblyName, tagHelpers))
{
errorSink.OnError(
parsed.AssemblyNameLocation,
Resources.FormatTagHelperAssemblyCouldNotBeResolved(parsed.AssemblyName),
parsed.AssemblyName.Length);
// Skip this one, it's an error
break;
}
for (var j = 0; j < tagHelpers.Count; j++)
{
var tagHelper = tagHelpers[j];
if (MatchesDirective(tagHelper, parsed))
{
matches.Add(tagHelper);
}
}
break;
case TagHelperDirectiveType.RemoveTagHelper:
parsed = ParseAddOrRemoveDirective(directive, errorSink);
if (parsed == null)
{
// Skip this one, it's an error
break;
}
if (!AssemblyContainsTagHelpers(parsed.AssemblyName, tagHelpers))
{
errorSink.OnError(
parsed.AssemblyNameLocation,
Resources.FormatTagHelperAssemblyCouldNotBeResolved(parsed.AssemblyName),
parsed.AssemblyName.Length);
// Skip this one, it's an error
break;
}
for (var j = 0; j < tagHelpers.Count; j++)
{
var tagHelper = tagHelpers[j];
if (MatchesDirective(tagHelper, parsed))
{
matches.Remove(tagHelper);
}
}
break;
case TagHelperDirectiveType.TagHelperPrefix:
// We only expect to see a single one of these per file, but that's enforced at another level.
prefixDirective = directive;
break;
}
}
var prefix = prefixDirective?.DirectiveText;
if (prefix != null && !IsValidTagHelperPrefix(prefix, prefixDirective.Location, errorSink))
{
prefix = null;
}
return PrefixDescriptors(prefix, matches);
}
private bool AssemblyContainsTagHelpers(string assemblyName, IReadOnlyList<TagHelperDescriptor> tagHelpers)
{
for (var i = 0; i < tagHelpers.Count; i++)
{
if (string.Equals(tagHelpers[i].AssemblyName, assemblyName, StringComparison.Ordinal))
{
return true;
}
}
return false;
}
// Internal for testing
internal ParsedDirective ParseAddOrRemoveDirective(TagHelperDirectiveDescriptor directive, ErrorSink errorSink)
{
var text = directive.DirectiveText;
var lookupStrings = text?.Split(new[] { ',' });
// Ensure that we have valid lookupStrings to work with. The valid format is "typeName, assemblyName"
if (lookupStrings == null ||
lookupStrings.Any(string.IsNullOrWhiteSpace) ||
lookupStrings.Length != 2)
{
errorSink.OnError(
directive.Location,
Resources.FormatInvalidTagHelperLookupText(text),
Math.Max(text.Length, 1));
return null;
}
var trimmedAssemblyName = lookupStrings[1].Trim();
// + 1 is for the comma separator in the lookup text.
var assemblyNameIndex =
lookupStrings[0].Length + 1 + lookupStrings[1].IndexOf(trimmedAssemblyName, StringComparison.Ordinal);
var assemblyNamePrefix = directive.DirectiveText.Substring(0, assemblyNameIndex);
var assemblyNameLocation = new SourceLocation(
directive.Location.FilePath,
directive.Location.AbsoluteIndex + assemblyNameIndex,
directive.Location.LineIndex,
directive.Location.CharacterIndex + assemblyNameIndex);
return new ParsedDirective
{
TypePattern = lookupStrings[0].Trim(),
AssemblyName = trimmedAssemblyName,
AssemblyNameLocation = assemblyNameLocation,
};
}
// Internal for testing
internal bool IsValidTagHelperPrefix(
string prefix,
SourceLocation directiveLocation,
ErrorSink errorSink)
{
foreach (var character in prefix)
{
// Prefixes are correlated with tag names, tag names cannot have whitespace.
if (char.IsWhiteSpace(character) || InvalidNonWhitespaceNameCharacters.Contains(character))
{
errorSink.OnError(
directiveLocation,
Resources.FormatInvalidTagHelperPrefixValue(
SyntaxConstants.CSharp.TagHelperPrefixKeyword,
character,
prefix),
prefix.Length);
return false;
}
}
return true;
}
private static IReadOnlyList<TagHelperDescriptor> PrefixDescriptors(
string prefix,
IEnumerable<TagHelperDescriptor> descriptors)
{
if (!string.IsNullOrEmpty(prefix))
{
return descriptors.Select(descriptor => new TagHelperDescriptor(descriptor)
{
Prefix = prefix
}).ToList();
}
return descriptors.ToList();
}
private static bool MatchesDirective(TagHelperDescriptor descriptor, ParsedDirective lookupInfo)
{
if (!string.Equals(descriptor.AssemblyName, lookupInfo.AssemblyName, StringComparison.Ordinal))
{
return false;
}
if (lookupInfo.TypePattern.EndsWith("*", StringComparison.Ordinal))
{
if (lookupInfo.TypePattern.Length == 1)
{
// TypePattern is "*".
return true;
}
var lookupTypeName = lookupInfo.TypePattern.Substring(0, lookupInfo.TypePattern.Length - 1);
return descriptor.TypeName.StartsWith(lookupTypeName, StringComparison.Ordinal);
}
return string.Equals(descriptor.TypeName, lookupInfo.TypePattern, StringComparison.Ordinal);
}
private static int GetErrorLength(string directiveText)
{
var nonNullLength = directiveText == null ? 1 : directiveText.Length;
var normalizeEmptyStringLength = Math.Max(nonNullLength, 1);
return normalizeEmptyStringLength;
}
private IReadOnlyList<RazorError> CombineErrors(IReadOnlyList<RazorError> errors1, IReadOnlyList<RazorError> errors2)
{
var combinedErrors = new List<RazorError>(errors1.Count + errors2.Count);
@ -79,7 +308,16 @@ namespace Microsoft.AspNetCore.Razor.Evolution
return combinedErrors;
}
private class Visitor : ParserVisitor
internal class ParsedDirective
{
public string AssemblyName { get; set; }
public string TypePattern { get; set; }
public SourceLocation AssemblyNameLocation { get; set; }
}
private class DirectiveVisitor : ParserVisitor
{
public List<TagHelperDirectiveDescriptor> Directives { get; } = new List<TagHelperDirectiveDescriptor>();

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.Evolution.Intermediate;
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
using Xunit;
using Xunit.Sdk;
@ -1451,21 +1450,6 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
AssertDesignTimeDocumentMatchBaseline(document);
}
private class TestTagHelperDescriptorResolver : ITagHelperDescriptorResolver
{
private readonly IEnumerable<TagHelperDescriptor> _descriptors;
public TestTagHelperDescriptorResolver(IEnumerable<TagHelperDescriptor> descriptors)
{
_descriptors = descriptors;
}
public IEnumerable<TagHelperDescriptor> Resolve(TagHelperDescriptorResolutionContext resolutionContext)
{
return _descriptors;
}
}
private class ApiSetsIRTestAdapter : RazorIRPassBase
{
public override int Order => RazorIRPass.LoweringOrder;

View File

@ -16,17 +16,20 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
new TagHelperDescriptor
{
TagName = "p",
TypeName = "PTagHelper"
TypeName = "PTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "form",
TypeName = "FormTagHelper"
TypeName = "FormTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "input",
TypeName = "InputTagHelper",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor

View File

@ -16,7 +16,8 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
new TagHelperDescriptor
{
TagName = "input",
TypeName = "InputTagHelper"
TypeName = "InputTagHelper",
AssemblyName = "TestAssembly",
}
};
@ -40,6 +41,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "InputTagHelper",
AssemblyName = "TestAssembly",
Attributes = new[] { new TagHelperAttributeDescriptor
{
Name = "bound",
@ -68,17 +70,20 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
new TagHelperDescriptor
{
TagName = "p",
TypeName = "PTagHelper"
TypeName = "PTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "form",
TypeName = "FormTagHelper"
TypeName = "FormTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "input",
TypeName = "InputTagHelper",
AssemblyName = "TestAssembly",
Attributes = new[] { new TagHelperAttributeDescriptor
{
Name = "value",

View File

@ -3,8 +3,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
@ -24,17 +22,20 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
new TagHelperDescriptor
{
TagName = "span",
TypeName = "SpanTagHelper"
TypeName = "SpanTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "div",
TypeName = "DivTagHelper"
TypeName = "DivTagHelper",
AssemblyName = "TestAssembly",
},
new TagHelperDescriptor
{
TagName = "input",
TypeName = "InputTagHelper",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -68,7 +69,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "a",
TypeName = "TestNamespace.ATagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[]
{
new TagHelperRequiredAttributeDescriptor
@ -84,7 +85,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "a",
TypeName = "TestNamespace.ATagHelperMultipleSelectors",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[]
{
new TagHelperRequiredAttributeDescriptor
@ -107,7 +108,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -127,7 +128,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper2",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -145,7 +146,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[]
{
new TagHelperRequiredAttributeDescriptor
@ -161,7 +162,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper2",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[]
{
new TagHelperRequiredAttributeDescriptor
@ -185,7 +186,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -201,7 +202,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -227,7 +228,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -283,7 +284,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -303,7 +304,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -341,7 +342,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -369,7 +370,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -381,7 +382,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -393,7 +394,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -405,7 +406,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -429,14 +430,14 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "p",
TypeName = "TestNamespace.PTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[] { new TagHelperRequiredAttributeDescriptor { Name = "class" } },
},
new TagHelperDescriptor
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo)
@ -447,7 +448,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper2",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),
@ -463,7 +464,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "*",
TypeName = "TestNamespace.CatchAllTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
RequiredAttributes = new[] { new TagHelperRequiredAttributeDescriptor { Name = "catchAll" } },
}
};
@ -480,7 +481,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper1",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -529,7 +530,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
{
TagName = "input",
TypeName = "TestNamespace.InputTagHelper2",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new[]
{
new TagHelperAttributeDescriptor
@ -578,7 +579,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
Prefix = prefix,
TagName = "p",
TypeName = "TestNamespace.PTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("age", pAgePropertyInfo)
@ -590,7 +591,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
Prefix = prefix,
TagName = "input",
TypeName = "TestNamespace.InputTagHelper",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo)
@ -602,7 +603,7 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests
Prefix = prefix,
TagName = "input",
TypeName = "TestNamespace.InputTagHelper2",
AssemblyName = "SomeAssembly",
AssemblyName = "TestAssembly",
Attributes = new TagHelperAttributeDescriptor[]
{
new TagHelperAttributeDescriptor("type", inputTypePropertyInfo),

View File

@ -156,13 +156,15 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
public void Lower_TagHelpers()
{
// Arrange
var codeDocument = TestRazorCodeDocument.Create(@"<span val=""@Hello World""></span>");
var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly
<span val=""@Hello World""></span>");
var tagHelpers = new[]
{
new TagHelperDescriptor
{
TagName = "span",
TypeName = "SpanTagHelper"
TypeName = "SpanTagHelper",
AssemblyName = "TestAssembly",
}
};
@ -196,17 +198,22 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
public void Lower_TagHelpersWithBoundAttribute()
{
// Arrange
var codeDocument = TestRazorCodeDocument.Create("<input bound='foo' />");
var codeDocument = TestRazorCodeDocument.Create(@"@addTagHelper *, TestAssembly
<input bound='foo' />");
var descriptor = new TagHelperDescriptor
{
TagName = "input",
TypeName = "InputTagHelper",
Attributes = new[] { new TagHelperAttributeDescriptor
AssemblyName = "TestAssembly",
Attributes = new[]
{
Name = "bound",
PropertyName = "FooProp",
TypeName = "System.String"
} }
new TagHelperAttributeDescriptor
{
Name = "bound",
PropertyName = "FooProp",
TypeName = "System.String"
}
}
};
// Act
@ -349,20 +356,5 @@ namespace Microsoft.AspNetCore.Razor.Evolution.Intermediate
return irDocument;
}
private class TestTagHelperDescriptorResolver : ITagHelperDescriptorResolver
{
private readonly IEnumerable<TagHelperDescriptor> _descriptors;
public TestTagHelperDescriptorResolver(IEnumerable<TagHelperDescriptor> descriptors)
{
_descriptors = descriptors;
}
public IEnumerable<TagHelperDescriptor> Resolve(TagHelperDescriptorResolutionContext resolutionContext)
{
return _descriptors;
}
}
}
}

View File

@ -1,8 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.Razor.Evolution.Legacy;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.AspNetCore.Razor.Evolution
@ -21,15 +19,5 @@ namespace Microsoft.AspNetCore.Razor.Evolution
resolver.TagHelpers.AddRange(tagHelpers);
return builder;
}
private class TestTagHelperDescriptorResolver : ITagHelperDescriptorResolver
{
public List<TagHelperDescriptor> TagHelpers { get; } = new List<TagHelperDescriptor>();
public IEnumerable<TagHelperDescriptor> Resolve(TagHelperDescriptorResolutionContext resolutionContext)
{
return TagHelpers;
}
}
}
}

View File

@ -1 +1 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"

View File

@ -1,4 +1,4 @@
@addTagHelper *, something
@addTagHelper *, TestAssembly
<p class="btn">
<p><strong catchAll="hi">Hello</strong><strong>World</strong></p>

View File

@ -1,9 +1,9 @@
Source Location: (184:5,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml)
Source Location: (187:5,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml)
|true|
Generated Location: (1565:25,42 [4] )
|true|
Source Location: (230:6,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml)
Source Location: (233:6,36 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml)
|true|
Generated Location: (2218:35,42 [4] )
|true|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6c8b55df08e7538ff6155a5bc3b8135b305ad08a"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/AttributeTargetingTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ea06819774d4f892a37cc84688446440dee29bd6"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper "something, nice"
@addTagHelper "*, TestAssembly"
<div data-animation="fade" class="randomNonTagHelperAttribute">
<p class="Hello World" data-delay="1000">

View File

@ -1,5 +1,5 @@
@tagHelperPrefix "THS"
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<THSdiv class="randomNonTagHelperAttribute">
<THSp class="Hello World">

View File

@ -1,4 +1,4 @@
Source Location: (224:7,43 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml)
Source Location: (226:7,43 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml)
|true|
Generated Location: (1350:23,43 [4] )
|true|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "859f448778119fd3043b1f19ea3d1f695558d6a6"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers_Prefixed.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e05d346bc9435e651c4c8f34515c1b5f2cff294a"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@removeTagHelper "doesntmatter, nice"
<div class="randomNonTagHelperAttribute">

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "02f53fe4a386cdc0885235e5fd3f5d6d317dd4d6"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/BasicTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "56c40717284b82fcb2ee9f60f09e8c6c0bda8959"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@if (true)
{

View File

@ -1,4 +1,4 @@
Source Location: (34:2,1 [52] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (36:2,1 [52] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|if (true)
{
var checkbox = "checkbox";
@ -11,7 +11,7 @@ Generated Location: (934:19,1 [52] )
|
Source Location: (222:9,13 [43] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (224:9,13 [43] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|if (false)
{
|
@ -20,7 +20,7 @@ Generated Location: (1126:28,13 [43] )
{
|
Source Location: (348:11,99 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (350:11,99 [66] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|
}
else
@ -33,193 +33,193 @@ Generated Location: (1846:40,99 [66] )
{
|
Source Location: (444:15,46 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (446:15,46 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|checkbox|
Generated Location: (2296:51,49 [8] )
|checkbox|
Source Location: (461:15,63 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (463:15,63 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|true|
Generated Location: (2649:58,63 [4] )
|true|
Source Location: (472:15,74 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (474:15,74 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|
|
Generated Location: (2950:64,74 [18] )
|
|
Source Location: (505:16,31 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (507:16,31 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|true ? "checkbox" : "anything"|
Generated Location: (3337:72,34 [30] )
|true ? "checkbox" : "anything"|
Source Location: (540:16,66 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (542:16,66 [18] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|
|
Generated Location: (3715:79,66 [18] )
|
|
Source Location: (572:17,30 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (574:17,30 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|if(true) { |
Generated Location: (4098:87,30 [11] )
|if(true) { |
Source Location: (604:17,62 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (606:17,62 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| } else { |
Generated Location: (4298:92,62 [10] )
| } else { |
Source Location: (635:17,93 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (637:17,93 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| }|
Generated Location: (4528:97,93 [2] )
| }|
Source Location: (639:17,97 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (641:17,97 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|
}|
Generated Location: (4908:104,97 [15] )
|
}|
Source Location: (161:7,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (163:7,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (5179:111,35 [12] )
|DateTime.Now|
Source Location: (781:21,14 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (783:21,14 [21] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| var @object = false;|
Generated Location: (5333:116,14 [21] )
| var @object = false;|
Source Location: (834:22,29 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (836:22,29 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|(|
Generated Location: (5731:123,42 [1] )
|(|
Source Location: (835:22,30 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (837:22,30 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|@object|
Generated Location: (5732:123,43 [7] )
|@object|
Source Location: (842:22,37 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (844:22,37 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|)|
Generated Location: (5739:123,50 [1] )
|)|
Source Location: (709:20,39 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (711:20,39 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTimeOffset.Now.Year|
Generated Location: (6001:129,38 [23] )
|DateTimeOffset.Now.Year|
Source Location: (732:20,62 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (734:20,62 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| - 1970|
Generated Location: (6024:129,61 [7] )
| - 1970|
Source Location: (974:25,61 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (976:25,61 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|(|
Generated Location: (6427:136,60 [1] )
|(|
Source Location: (975:25,62 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (977:25,62 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTimeOffset.Now.Year > 2014|
Generated Location: (6428:136,61 [30] )
|DateTimeOffset.Now.Year > 2014|
Source Location: (1005:25,92 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1007:25,92 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|)|
Generated Location: (6458:136,91 [1] )
|)|
Source Location: (877:24,16 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (879:24,16 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|-1970 + |
Generated Location: (6715:142,33 [8] )
|-1970 + |
Source Location: (885:24,24 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (887:24,24 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|@|
Generated Location: (6723:142,41 [1] )
|@|
Source Location: (886:24,25 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (888:24,25 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTimeOffset.Now.Year|
Generated Location: (6724:142,42 [23] )
|DateTimeOffset.Now.Year|
Source Location: (1104:28,28 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1106:28,28 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTimeOffset.Now.Year > 2014|
Generated Location: (7125:149,42 [30] )
|DateTimeOffset.Now.Year > 2014|
Source Location: (1042:27,16 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1044:27,16 [30] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|DateTimeOffset.Now.Year - 1970|
Generated Location: (7411:155,33 [30] )
|DateTimeOffset.Now.Year - 1970|
Source Location: (1232:31,28 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1234:31,28 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| |
Generated Location: (7819:162,42 [3] )
| |
Source Location: (1235:31,31 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1237:31,31 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|@(|
Generated Location: (7822:162,45 [2] )
|@(|
Source Location: (1237:31,33 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1239:31,33 [27] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| DateTimeOffset.Now.Year |
Generated Location: (7824:162,47 [27] )
| DateTimeOffset.Now.Year |
Source Location: (1264:31,60 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1266:31,60 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|)|
Generated Location: (7851:162,74 [1] )
|)|
Source Location: (1265:31,61 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1267:31,61 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
| > 2014 |
Generated Location: (7852:162,75 [10] )
| > 2014 |
Source Location: (1169:30,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1171:30,17 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|(|
Generated Location: (8118:168,33 [1] )
|(|
Source Location: (1170:30,18 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1172:30,18 [29] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|"My age is this long.".Length|
Generated Location: (8119:168,34 [29] )
|"My age is this long.".Length|
Source Location: (1199:30,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1201:30,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|)|
Generated Location: (8148:168,63 [1] )
|)|
Source Location: (1304:33,9 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1306:33,9 [11] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|someMethod(|
Generated Location: (8289:173,12 [11] )
|someMethod(|
Source Location: (1359:33,64 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1361:33,64 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|checked|
Generated Location: (8711:177,63 [7] )
|checked|
Source Location: (1324:33,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1326:33,29 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|123|
Generated Location: (8966:183,33 [3] )
|123|
Source Location: (1373:33,78 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1375:33,78 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|)|
Generated Location: (9007:188,1 [1] )
|)|
Source Location: (1386:34,10 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
Source Location: (1388:34,10 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml)
|
}|
Generated Location: (9146:193,10 [3] )

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3cc5f5ed458e4e33874c4242798b195a31ab065c"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "51e77018024aeb0f14e5fc30bf13b895e48b90e2"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden
@ -220,10 +220,10 @@ __TestNamespace_InputTagHelper2.Checked = true;
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "time", 3, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 146, "Current", 146, 7, true);
AddHtmlAttributeValue(" ", 153, "Time:", 154, 6, true);
AddHtmlAttributeValue("", 148, "Current", 148, 7, true);
AddHtmlAttributeValue(" ", 155, "Time:", 156, 6, true);
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ComplexTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 159, DateTime.Now, 160, 13, false);
AddHtmlAttributeValue(" ", 161, DateTime.Now, 162, 13, false);
#line default
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper "*, something"
@addTagHelper "*, TestAssembly"
<a href="~/">2 TagHelpers.</a>
<a href=~/hello>1 TagHelper.</a>

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p age="3" AGE="40" Age="500">
<input type="button" TYPE="checkbox" />

View File

@ -1,14 +1,14 @@
Source Location: (144:4,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
Source Location: (146:4,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
|true|
Generated Location: (1713:27,42 [4] )
|true|
Source Location: (220:5,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
Source Location: (222:5,34 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
|true|
Generated Location: (2255:36,42 [4] )
|true|
Source Location: (41:2,8 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
Source Location: (43:2,8 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml)
|3|
Generated Location: (2525:42,33 [1] )
|3|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b7cbc77774bfe558f4548cc5b3760f88754a329e"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "f64041250fa76433a1542ae43458ed7ba286a01c"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,3 +1,3 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<input type="checkbox" checked="true" />

View File

@ -1,4 +1,4 @@
Source Location: (65:2,32 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml)
Source Location: (67:2,32 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml)
|true|
Generated Location: (1664:26,41 [4] )
|true|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1014725b9048d825ce97b0e5e260ac35f057fe0a"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DuplicateTargetTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "cce7d92553451468e4599af8a8329633dbad75a3"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<input unbound="prefix @DateTime.Now" />

View File

@ -1,149 +1,149 @@
Source Location: (57:2,24 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (59:2,24 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (901:18,27 [12] )
|DateTime.Now|
Source Location: (94:4,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (96:4,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|if (true) { |
Generated Location: (1169:24,17 [12] )
|if (true) { |
Source Location: (107:4,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (109:4,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|string.Empty|
Generated Location: (1349:29,33 [12] )
|string.Empty|
Source Location: (119:4,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (121:4,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| } else { |
Generated Location: (1539:34,42 [10] )
| } else { |
Source Location: (130:4,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (132:4,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|false|
Generated Location: (1740:39,56 [5] )
|false|
Source Location: (135:4,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (137:4,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| }|
Generated Location: (1939:44,58 [2] )
| }|
Source Location: (174:6,22 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (176:6,22 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (2204:50,25 [12] )
|DateTime.Now|
Source Location: (212:6,60 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (214:6,60 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (2481:56,63 [12] )
|DateTime.Now|
Source Location: (254:8,15 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (256:8,15 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|long.MinValue|
Generated Location: (2750:62,18 [13] )
|long.MinValue|
Source Location: (269:8,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (271:8,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|if (true) { |
Generated Location: (2929:67,30 [12] )
|if (true) { |
Source Location: (282:8,43 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (284:8,43 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|string.Empty|
Generated Location: (3122:72,46 [12] )
|string.Empty|
Source Location: (294:8,55 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (296:8,55 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| } else { |
Generated Location: (3325:77,55 [10] )
| } else { |
Source Location: (305:8,66 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (307:8,66 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|false|
Generated Location: (3539:82,69 [5] )
|false|
Source Location: (310:8,71 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (312:8,71 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| }|
Generated Location: (3751:87,71 [2] )
| }|
Source Location: (314:8,75 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (316:8,75 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|int.MaxValue|
Generated Location: (3966:92,78 [12] )
|int.MaxValue|
Source Location: (346:9,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (348:9,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|long.MinValue|
Generated Location: (4201:98,20 [13] )
|long.MinValue|
Source Location: (361:9,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (363:9,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|if (true) { |
Generated Location: (4383:103,32 [12] )
|if (true) { |
Source Location: (374:9,45 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (376:9,45 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|string.Empty|
Generated Location: (4579:108,48 [12] )
|string.Empty|
Source Location: (386:9,57 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (388:9,57 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| } else { |
Generated Location: (4785:113,57 [10] )
| } else { |
Source Location: (397:9,68 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (399:9,68 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|false|
Generated Location: (5002:118,71 [5] )
|false|
Source Location: (402:9,73 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (404:9,73 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| }|
Generated Location: (5217:123,73 [2] )
| }|
Source Location: (406:9,77 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (408:9,77 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|int.MaxValue|
Generated Location: (5435:128,80 [12] )
|int.MaxValue|
Source Location: (443:11,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (445:11,17 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|long.MinValue|
Generated Location: (5707:134,20 [13] )
|long.MinValue|
Source Location: (458:11,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (460:11,32 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (5892:139,35 [12] )
|DateTime.Now|
Source Location: (490:11,64 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (492:11,64 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|int.MaxValue|
Generated Location: (6108:144,67 [12] )
|int.MaxValue|
Source Location: (527:13,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (529:13,17 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|if (true) { |
Generated Location: (6377:150,17 [12] )
|if (true) { |
Source Location: (540:13,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (542:13,30 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|string.Empty|
Generated Location: (6558:155,33 [12] )
|string.Empty|
Source Location: (552:13,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (554:13,42 [10] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| } else { |
Generated Location: (6749:160,42 [10] )
| } else { |
Source Location: (563:13,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (565:13,53 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
|false|
Generated Location: (6951:165,56 [5] )
|false|
Source Location: (568:13,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
Source Location: (570:13,58 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml)
| }|
Generated Location: (7151:170,58 [2] )
| }|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "107e341010aad754fc5c952722dbfdc7e33fc38e"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e044ca9442dd9f93d8ce7f93a79c46a542221f1e"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden
@ -35,9 +35,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 49, "prefix", 49, 6, true);
AddHtmlAttributeValue("", 51, "prefix", 51, 6, true);
#line 3 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 55, DateTime.Now, 56, 13, false);
AddHtmlAttributeValue(" ", 57, DateTime.Now, 58, 13, false);
#line default
#line hidden
@ -56,7 +56,7 @@ AddHtmlAttributeValue(" ", 55, DateTime.Now, 56, 13, false);
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 93, new HelperResult(async(__razor_attribute_value_writer) => {
AddHtmlAttributeValue("", 95, new HelperResult(async(__razor_attribute_value_writer) => {
#line 5 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
if (true) {
@ -83,8 +83,8 @@ WriteTo(__razor_attribute_value_writer, string.Empty);
#line default
#line hidden
}
), 93, 44, false);
AddHtmlAttributeValue(" ", 137, "suffix", 138, 7, true);
), 95, 44, false);
AddHtmlAttributeValue(" ", 139, "suffix", 140, 7, true);
EndAddHtmlAttributeValues(__tagHelperExecutionContext);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -111,13 +111,13 @@ WriteTo(__razor_attribute_value_writer, string.Empty);
__TestNamespace_InputTagHelper.Bound = __tagHelperStringValueBuffer;
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 204, "prefix", 204, 6, true);
AddHtmlAttributeValue("", 206, "prefix", 206, 6, true);
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 13, false);
AddHtmlAttributeValue(" ", 212, DateTime.Now, 213, 13, false);
#line default
#line hidden
AddHtmlAttributeValue(" ", 224, "suffix", 225, 7, true);
AddHtmlAttributeValue(" ", 226, "suffix", 227, 7, true);
EndAddHtmlAttributeValues(__tagHelperExecutionContext);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)
@ -175,11 +175,11 @@ AddHtmlAttributeValue(" ", 210, DateTime.Now, 211, 13, false);
__tagHelperExecutionContext.AddTagHelperAttribute("bound", __TestNamespace_InputTagHelper.Bound, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 3, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue("", 345, long.MinValue, 345, 14, false);
AddHtmlAttributeValue("", 347, long.MinValue, 347, 14, false);
#line default
#line hidden
AddHtmlAttributeValue(" ", 359, new HelperResult(async(__razor_attribute_value_writer) => {
AddHtmlAttributeValue(" ", 361, new HelperResult(async(__razor_attribute_value_writer) => {
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
if (true) {
@ -206,9 +206,9 @@ AddHtmlAttributeValue("", 345, long.MinValue, 345, 14, false);
#line default
#line hidden
}
), 360, 44, false);
), 362, 44, false);
#line 10 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 404, int.MaxValue, 405, 13, false);
AddHtmlAttributeValue(" ", 406, int.MaxValue, 407, 13, false);
#line default
#line hidden
@ -228,19 +228,19 @@ AddHtmlAttributeValue(" ", 404, int.MaxValue, 405, 13, false);
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 5, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue("", 442, long.MinValue, 442, 14, false);
AddHtmlAttributeValue("", 444, long.MinValue, 444, 14, false);
#line default
#line hidden
#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 456, DateTime.Now, 457, 13, false);
AddHtmlAttributeValue(" ", 458, DateTime.Now, 459, 13, false);
#line default
#line hidden
AddHtmlAttributeValue(" ", 470, "static", 471, 7, true);
AddHtmlAttributeValue(" ", 477, "content", 481, 11, true);
AddHtmlAttributeValue(" ", 472, "static", 473, 7, true);
AddHtmlAttributeValue(" ", 479, "content", 483, 11, true);
#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
AddHtmlAttributeValue(" ", 488, int.MaxValue, 489, 13, false);
AddHtmlAttributeValue(" ", 490, int.MaxValue, 491, 13, false);
#line default
#line hidden
@ -259,7 +259,7 @@ AddHtmlAttributeValue(" ", 488, int.MaxValue, 489, 13, false);
__TestNamespace_InputTagHelper = CreateTagHelper<global::TestNamespace.InputTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_InputTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "unbound", 1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 526, new HelperResult(async(__razor_attribute_value_writer) => {
AddHtmlAttributeValue("", 528, new HelperResult(async(__razor_attribute_value_writer) => {
#line 14 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/DynamicAttributeTagHelpers.cshtml"
if (true) {
@ -286,7 +286,7 @@ WriteTo(__razor_attribute_value_writer, string.Empty);
#line default
#line hidden
}
), 526, 44, false);
), 528, 44, false);
EndAddHtmlAttributeValues(__tagHelperExecutionContext);
await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
if (!__tagHelperExecutionContext.Output.IsContentModified)

View File

@ -1,4 +1,4 @@
@addTagHelper something
@addTagHelper *, TestAssembly
<div>
<input type= checked=""class="" />

View File

@ -1,14 +1,14 @@
Source Location: (60:3,26 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
Source Location: (66:3,26 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
||
Generated Location: (1341:23,42 [0] )
||
Source Location: (120:5,30 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
Source Location: (126:5,30 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
||
Generated Location: (1869:32,42 [0] )
||
Source Location: (86:4,12 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
Source Location: (92:4,12 [0] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml)
||
Generated Location: (2131:38,33 [0] )
||

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ab5e45403d2c57cfdbab9546c3a27eea94f0fb5c"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EmptyAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ebd7c5a5d3edbcd879a6437ec728fafa9c84d312"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@{
var enumValue = MyEnum.MyValue;

View File

@ -1,4 +1,4 @@
Source Location: (35:2,2 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (37:2,2 [39] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|
var enumValue = MyEnum.MyValue;
|
@ -7,37 +7,37 @@ Generated Location: (848:18,2 [39] )
var enumValue = MyEnum.MyValue;
|
Source Location: (94:6,15 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (96:6,15 [14] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|MyEnum.MyValue|
Generated Location: (1259:26,39 [14] )
|MyEnum.MyValue|
Source Location: (129:7,15 [20] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (131:7,15 [20] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|MyEnum.MySecondValue|
Generated Location: (1627:33,18 [20] )
|MyEnum.MySecondValue|
Source Location: (169:8,14 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (171:8,14 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|MyValue|
Generated Location: (2116:40,133 [7] )
|MyValue|
Source Location: (196:9,14 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (198:9,14 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|MySecondValue|
Generated Location: (2593:47,133 [13] )
|MySecondValue|
Source Location: (222:9,40 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (224:9,40 [7] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|MyValue|
Generated Location: (2870:52,139 [7] )
|MyValue|
Source Location: (249:10,15 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (251:10,15 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|enumValue|
Generated Location: (3253:59,39 [9] )
|enumValue|
Source Location: (272:10,38 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
Source Location: (274:10,38 [9] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml)
|enumValue|
Generated Location: (3432:64,45 [9] )
|enumValue|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "f9124dcd7da8c06ab193a971690c676c5e0adaac"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "c55ebb3869f93768c36d432f769272b9f8feeb0b"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden
@ -68,7 +68,7 @@ __TestNamespace_InputTagHelper.Value = MyEnum.MyValue;
__tagHelperExecutionContext.Add(__TestNamespace_CatchAllTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EnumTagHelpers.cshtml"
AddHtmlAttributeValue("", 128, MyEnum.MySecondValue, 128, 21, false);
AddHtmlAttributeValue("", 130, MyEnum.MySecondValue, 130, 21, false);
#line default
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something
@addTagHelper *, TestAssembly
<!div class="randomNonTagHelperAttribute">
<!p class="Hello World" @DateTime.Now>

View File

@ -1,14 +1,14 @@
Source Location: (100:3,29 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
Source Location: (106:3,29 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (880:18,32 [12] )
|DateTime.Now|
Source Location: (198:5,51 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
Source Location: (204:5,51 [12] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
|DateTime.Now|
Generated Location: (1281:25,54 [12] )
|DateTime.Now|
Source Location: (221:5,74 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
Source Location: (227:5,74 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml)
|true|
Generated Location: (1648:32,74 [4] )
|true|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "93da17a7091c4d218cfc54282dec1b7b7beac072"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/EscapedTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e082322a2f2c103fcc2779608d1ef7fe4b915d75"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,3 +1,3 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p class="

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "762284e0617212ef833fd39f08039bf078039570"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "2b8b22f00f74af242e046b0dd3ab40dc54d6bfd8"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p catchall-unbound-required>
<input nottaghelper />

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<script type="text/html">
<div data-animation="fade" class="randomNonTagHelperAttribute">

View File

@ -1,21 +1,21 @@
Source Location: (193:5,13 [46] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
Source Location: (195:5,13 [46] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
|for(var i = 0; i < 5; i++) {
|
Generated Location: (962:19,13 [46] )
|for(var i = 0; i < 5; i++) {
|
Source Location: (337:7,50 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
Source Location: (339:7,50 [23] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
|ViewBag.DefaultInterval|
Generated Location: (1403:27,53 [23] )
|ViewBag.DefaultInterval|
Source Location: (387:7,100 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
Source Location: (389:7,100 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
|true|
Generated Location: (1809:34,100 [4] )
|true|
Source Location: (420:8,25 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
Source Location: (422:8,25 [15] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml)
|
}|
Generated Location: (1973:39,25 [15] )

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "e3cbc45bc2d4185bf69128f14721795d68e6961a"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/NestedScriptTagTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "880f98e8cc874c7736b089ea69af2461a11eacb2"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@{
var literate = "or illiterate";

View File

@ -1,4 +1,4 @@
Source Location: (35:2,2 [242] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (37:2,2 [242] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|
var literate = "or illiterate";
var intDictionary = new Dictionary<string, int>
@ -23,52 +23,52 @@ Generated Location: (872:18,2 [242] )
};
|
Source Location: (368:15,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (370:15,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|intDictionary|
Generated Location: (1515:34,56 [13] )
|intDictionary|
Source Location: (402:15,77 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (404:15,77 [16] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|stringDictionary|
Generated Location: (1867:40,77 [16] )
|stringDictionary|
Source Location: (466:16,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (468:16,43 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|intDictionary|
Generated Location: (2417:48,56 [13] )
|intDictionary|
Source Location: (500:16,77 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (502:16,77 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|37|
Generated Location: (2769:54,77 [2] )
|37|
Source Location: (524:16,101 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (526:16,101 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|42|
Generated Location: (3154:60,101 [2] )
|42|
Source Location: (588:18,31 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (590:18,31 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|42|
Generated Location: (3675:68,46 [2] )
|42|
Source Location: (609:18,52 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (611:18,52 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|37|
Generated Location: (4004:74,64 [2] )
|37|
Source Location: (632:18,75 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (634:18,75 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|98|
Generated Location: (4359:80,75 [2] )
|98|
Source Location: (781:20,42 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (783:20,42 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|literate|
Generated Location: (5144:90,45 [8] )
|literate|
Source Location: (824:21,29 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
Source Location: (826:21,29 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml)
|37|
Generated Location: (5808:99,65 [2] )
|37|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5ae668a393146e4a06179eb37952603907a9b825"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/PrefixedAttributeTagHelpers.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6e6edd0cad896f8dbf05be369b813477046ccd40"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1 +1 @@
@removeTagHelper something, nice
@removeTagHelper "*, TestAssembly"

View File

@ -1,3 +1,3 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p class="Hello World" age="1337">Body of Tag</p>

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p
class="Hello World" age="1337">Body of Tag</p>

View File

@ -1,4 +1,4 @@
Source Location: (65:3,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml)
Source Location: (67:3,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml)
|1337|
Generated Location: (923:18,33 [4] )
|1337|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "83a2d9976b209020f80917aa61a3338e37d3c446"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelperWithNewlineBeforeAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "1fcd2e2ee0b7146c8c0ec8a1721b4ffdc71e9f1e"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
Source Location: (61:2,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml)
Source Location: (63:2,28 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml)
|1337|
Generated Location: (869:18,33 [4] )
|1337|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4d7ff17da750ffcbca3130faffef1030e5eb03b8"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SingleTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "a46ef1b45affd451aae23202a87f93feb5c454f4"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper *, nice
@addTagHelper *, TestAssembly
<ul [item]="items"></ul>
<ul [(item)]="items"></ul>

View File

@ -1,19 +1,19 @@
Source Location: (294:11,18 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
Source Location: (302:11,18 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
|items|
Generated Location: (923:18,46 [5] )
|items|
Source Location: (343:12,20 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
Source Location: (351:12,20 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
|items|
Generated Location: (1216:24,47 [5] )
|items|
Source Location: (397:13,23 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
Source Location: (405:13,23 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
|doSomething()|
Generated Location: (1505:30,43 [13] )
|doSomething()|
Source Location: (479:14,24 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
Source Location: (487:14,24 [13] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml)
|doSomething()|
Generated Location: (1802:36,43 [13] )
|doSomething()|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "85cdc137d6a8c95fa926441de44d5187d5c8051e"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/SymbolBoundAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "10f840b503550891681c6569925ce1a183d07e75"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@{
var code = "some code";

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
<p
class

View File

@ -1,14 +1,14 @@
Source Location: (72:5,21 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
Source Location: (74:5,21 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
|1337|
Generated Location: (1101:20,33 [4] )
|1337|
Source Location: (97:6,19 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
Source Location: (99:6,19 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
|true|
Generated Location: (1274:25,22 [4] )
|true|
Source Location: (184:10,11 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
Source Location: (186:10,11 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml)
|1234|
Generated Location: (1910:35,33 [4] )
|1234|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "44db1fa170a6845ec719f4200e4bb1f639830b49"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TagHelpersWithWeirdlySpacedAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d02c1a0d63df91a5ffded6b9a62cfda3584cbd5f"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden

View File

@ -1,4 +1,4 @@
@addTagHelper something, nice
@addTagHelper "*, TestAssembly"
@{
var @class = "container-fluid";
var @int = 1;

View File

@ -1,4 +1,4 @@
Source Location: (33:1,2 [59] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (35:1,2 [59] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|
var @class = "container-fluid";
var @int = 1;
@ -9,77 +9,77 @@ Generated Location: (777:17,2 [59] )
var @int = 1;
|
Source Location: (120:6,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (122:6,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|1337|
Generated Location: (1103:25,33 [4] )
|1337|
Source Location: (155:7,12 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (157:7,12 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@class|
Generated Location: (1359:31,15 [6] )
|@class|
Source Location: (169:7,26 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (171:7,26 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|42|
Generated Location: (1540:36,33 [2] )
|42|
Source Location: (200:8,21 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (202:8,21 [5] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|42 + |
Generated Location: (1812:42,33 [5] )
|42 + |
Source Location: (205:8,26 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (207:8,26 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@|
Generated Location: (1817:42,38 [1] )
|@|
Source Location: (206:8,27 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (208:8,27 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|int|
Generated Location: (1818:42,39 [3] )
|int|
Source Location: (239:9,22 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (241:9,22 [3] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|int|
Generated Location: (2092:48,33 [3] )
|int|
Source Location: (272:10,22 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (274:10,22 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|(|
Generated Location: (2366:54,33 [1] )
|(|
Source Location: (273:10,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (275:10,23 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@int|
Generated Location: (2367:54,34 [4] )
|@int|
Source Location: (277:10,27 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (279:10,27 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|)|
Generated Location: (2371:54,38 [1] )
|)|
Source Location: (305:11,19 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (307:11,19 [6] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@class|
Generated Location: (2632:60,22 [6] )
|@class|
Source Location: (319:11,33 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (321:11,33 [4] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|4 * |
Generated Location: (2814:65,33 [4] )
|4 * |
Source Location: (323:11,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (325:11,37 [2] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@(|
Generated Location: (2818:65,37 [2] )
|@(|
Source Location: (325:11,39 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (327:11,39 [8] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|@int + 2|
Generated Location: (2820:65,39 [8] )
|@int + 2|
Source Location: (333:11,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
Source Location: (335:11,47 [1] TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml)
|)|
Generated Location: (2828:65,47 [1] )
|)|

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "b9b5a5baa9e2ea89cb37a127c0623b083bff74c3"
#pragma checksum "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "f3bafd9eaf3c9718228a830b5c71dc8536f1f7f2"
namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
{
#line hidden
@ -45,9 +45,9 @@ namespace Microsoft.AspNetCore.Razor.Evolution.IntegrationTests.TestFiles
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 107, new HelperResult(async(__razor_attribute_value_writer) => {
AddHtmlAttributeValue("", 109, new HelperResult(async(__razor_attribute_value_writer) => {
}
), 107, 6, false);
), 109, 6, false);
EndAddHtmlAttributeValues(__tagHelperExecutionContext);
#line 7 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
__TestNamespace_PTagHelper.Age = 1337;
@ -70,7 +70,7 @@ __TestNamespace_PTagHelper.Age = 1337;
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 1, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
#line 8 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
AddHtmlAttributeValue("", 153, @class, 153, 9, false);
AddHtmlAttributeValue("", 155, @class, 155, 9, false);
#line default
#line hidden
@ -155,9 +155,9 @@ __TestNamespace_PTagHelper.Age = (@int);
__TestNamespace_PTagHelper = CreateTagHelper<global::TestNamespace.PTagHelper>();
__tagHelperExecutionContext.Add(__TestNamespace_PTagHelper);
BeginAddHtmlAttributeValues(__tagHelperExecutionContext, "class", 2, global::Microsoft.AspNetCore.Razor.Evolution.Legacy.HtmlAttributeValueStyle.DoubleQuotes);
AddHtmlAttributeValue("", 296, "custom-", 296, 7, true);
AddHtmlAttributeValue("", 298, "custom-", 298, 7, true);
#line 12 "TestFiles/IntegrationTests/CodeGenerationIntegrationTest/TransitionsInTagHelperAttributes.cshtml"
AddHtmlAttributeValue("", 303, @class, 303, 9, false);
AddHtmlAttributeValue("", 305, @class, 305, 9, false);
#line default
#line hidden

View File

@ -0,0 +1,27 @@
// 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
{
internal class TestTagHelperDescriptorResolver : ITagHelperDescriptorResolver
{
public TestTagHelperDescriptorResolver()
{
}
public TestTagHelperDescriptorResolver(IEnumerable<TagHelperDescriptor> tagHelpers)
{
TagHelpers.AddRange(tagHelpers);
}
public List<TagHelperDescriptor> TagHelpers { get; } = new List<TagHelperDescriptor>();
public IEnumerable<TagHelperDescriptor> Resolve(ErrorSink errorSink)
{
return TagHelpers;
}
}
}