React to Razor `TargetElementAttribute` rename.

aspnet/Razor#516
This commit is contained in:
N. Taylor Mullen 2015-09-13 12:29:58 -07:00
parent 94388a8804
commit 93735a5be6
27 changed files with 83 additions and 83 deletions

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelperSample.Web
{
[TargetElement("iecondition")]
[HtmlTargetElement("iecondition")]
public class ConditionalCommentTagHelper : TagHelper
{
public CommentMode Mode { get; set; }

View File

@ -17,35 +17,35 @@ namespace Microsoft.AspNet.Mvc.Razor.TagHelpers
/// <remarks>Resolves URLs starting with '~/' (relative to the application's 'webroot' setting) that are not
/// targeted by other <see cref="ITagHelper"/>s. Runs prior to other <see cref="ITagHelper"/>s to ensure
/// application-relative URLs are resolved.</remarks>
[TargetElement("*", Attributes = "itemid")]
[TargetElement("a", Attributes = "href")]
[TargetElement("applet", Attributes = "archive")]
[TargetElement("area", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("audio", Attributes = "src")]
[TargetElement("base", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("blockquote", Attributes = "cite")]
[TargetElement("button", Attributes = "formaction")]
[TargetElement("del", Attributes = "cite")]
[TargetElement("embed", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("form", Attributes = "action")]
[TargetElement("html", Attributes = "manifest")]
[TargetElement("iframe", Attributes = "src")]
[TargetElement("img", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("img", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("input", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("input", Attributes = "formaction", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("ins", Attributes = "cite")]
[TargetElement("link", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("menuitem", Attributes = "icon")]
[TargetElement("object", Attributes = "archive")]
[TargetElement("object", Attributes = "data")]
[TargetElement("q", Attributes = "cite")]
[TargetElement("script", Attributes = "src")]
[TargetElement("source", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("source", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("track", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("video", Attributes = "src")]
[TargetElement("video", Attributes = "poster")]
[HtmlTargetElement("*", Attributes = "itemid")]
[HtmlTargetElement("a", Attributes = "href")]
[HtmlTargetElement("applet", Attributes = "archive")]
[HtmlTargetElement("area", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("audio", Attributes = "src")]
[HtmlTargetElement("base", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("blockquote", Attributes = "cite")]
[HtmlTargetElement("button", Attributes = "formaction")]
[HtmlTargetElement("del", Attributes = "cite")]
[HtmlTargetElement("embed", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("form", Attributes = "action")]
[HtmlTargetElement("html", Attributes = "manifest")]
[HtmlTargetElement("iframe", Attributes = "src")]
[HtmlTargetElement("img", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("img", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("input", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("input", Attributes = "formaction", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("ins", Attributes = "cite")]
[HtmlTargetElement("link", Attributes = "href", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("menuitem", Attributes = "icon")]
[HtmlTargetElement("object", Attributes = "archive")]
[HtmlTargetElement("object", Attributes = "data")]
[HtmlTargetElement("q", Attributes = "cite")]
[HtmlTargetElement("script", Attributes = "src")]
[HtmlTargetElement("source", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("source", Attributes = "srcset", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("track", Attributes = "src", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("video", Attributes = "src")]
[HtmlTargetElement("video", Attributes = "poster")]
[EditorBrowsable(EditorBrowsableState.Never)]
public class UrlResolutionTagHelper : TagHelper
{

View File

@ -12,14 +12,14 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;a&gt; elements.
/// </summary>
[TargetElement("a", Attributes = ActionAttributeName)]
[TargetElement("a", Attributes = ControllerAttributeName)]
[TargetElement("a", Attributes = FragmentAttributeName)]
[TargetElement("a", Attributes = HostAttributeName)]
[TargetElement("a", Attributes = ProtocolAttributeName)]
[TargetElement("a", Attributes = RouteAttributeName)]
[TargetElement("a", Attributes = RouteValuesDictionaryName)]
[TargetElement("a", Attributes = RouteValuesPrefix + "*")]
[HtmlTargetElement("a", Attributes = ActionAttributeName)]
[HtmlTargetElement("a", Attributes = ControllerAttributeName)]
[HtmlTargetElement("a", Attributes = FragmentAttributeName)]
[HtmlTargetElement("a", Attributes = HostAttributeName)]
[HtmlTargetElement("a", Attributes = ProtocolAttributeName)]
[HtmlTargetElement("a", Attributes = RouteAttributeName)]
[HtmlTargetElement("a", Attributes = RouteValuesDictionaryName)]
[HtmlTargetElement("a", Attributes = RouteValuesPrefix + "*")]
public class AnchorTagHelper : TagHelper
{
private const string ActionAttributeName = "asp-action";

View File

@ -12,12 +12,12 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;form&gt; elements.
/// </summary>
[TargetElement("form", Attributes = ActionAttributeName)]
[TargetElement("form", Attributes = AntiforgeryAttributeName)]
[TargetElement("form", Attributes = ControllerAttributeName)]
[TargetElement("form", Attributes = RouteAttributeName)]
[TargetElement("form", Attributes = RouteValuesDictionaryName)]
[TargetElement("form", Attributes = RouteValuesPrefix + "*")]
[HtmlTargetElement("form", Attributes = ActionAttributeName)]
[HtmlTargetElement("form", Attributes = AntiforgeryAttributeName)]
[HtmlTargetElement("form", Attributes = ControllerAttributeName)]
[HtmlTargetElement("form", Attributes = RouteAttributeName)]
[HtmlTargetElement("form", Attributes = RouteValuesDictionaryName)]
[HtmlTargetElement("form", Attributes = RouteValuesPrefix + "*")]
public class FormTagHelper : TagHelper
{
private const string ActionAttributeName = "asp-action";

View File

@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <remarks>
/// The tag helper won't process for cases with just the 'src' attribute.
/// </remarks>
[TargetElement(
[HtmlTargetElement(
"img",
Attributes = AppendVersionAttributeName + "," + SrcAttributeName,
TagStructure = TagStructure.WithoutEndTag)]

View File

@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;input&gt; elements with an <c>asp-for</c> attribute.
/// </summary>
[TargetElement("input", Attributes = ForAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("input", Attributes = ForAttributeName, TagStructure = TagStructure.WithoutEndTag)]
public class InputTagHelper : TagHelper
{
private const string ForAttributeName = "asp-for";

View File

@ -10,7 +10,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;label&gt; elements with an <c>asp-for</c> attribute.
/// </summary>
[TargetElement("label", Attributes = ForAttributeName)]
[HtmlTargetElement("label", Attributes = ForAttributeName)]
public class LabelTagHelper : TagHelper
{
private const string ForAttributeName = "asp-for";

View File

@ -22,15 +22,15 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <remarks>
/// The tag helper won't process for cases with just the 'href' attribute.
/// </remarks>
[TargetElement("link", Attributes = HrefIncludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = HrefExcludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackHrefAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackHrefIncludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackHrefExcludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackTestClassAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackTestPropertyAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = FallbackTestValueAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[TargetElement("link", Attributes = AppendVersionAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = HrefIncludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = HrefExcludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackHrefAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackHrefIncludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackHrefExcludeAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackTestClassAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackTestPropertyAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = FallbackTestValueAttributeName, TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("link", Attributes = AppendVersionAttributeName, TagStructure = TagStructure.WithoutEndTag)]
public class LinkTagHelper : UrlResolutionTagHelper
{
private static readonly string Namespace = typeof(LinkTagHelper).Namespace;

View File

@ -20,13 +20,13 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <remarks>
/// The tag helper won't process for cases with just the 'src' attribute.
/// </remarks>
[TargetElement("script", Attributes = SrcIncludeAttributeName)]
[TargetElement("script", Attributes = SrcExcludeAttributeName)]
[TargetElement("script", Attributes = FallbackSrcAttributeName)]
[TargetElement("script", Attributes = FallbackSrcIncludeAttributeName)]
[TargetElement("script", Attributes = FallbackSrcExcludeAttributeName)]
[TargetElement("script", Attributes = FallbackTestExpressionAttributeName)]
[TargetElement("script", Attributes = AppendVersionAttributeName)]
[HtmlTargetElement("script", Attributes = SrcIncludeAttributeName)]
[HtmlTargetElement("script", Attributes = SrcExcludeAttributeName)]
[HtmlTargetElement("script", Attributes = FallbackSrcAttributeName)]
[HtmlTargetElement("script", Attributes = FallbackSrcIncludeAttributeName)]
[HtmlTargetElement("script", Attributes = FallbackSrcExcludeAttributeName)]
[HtmlTargetElement("script", Attributes = FallbackTestExpressionAttributeName)]
[HtmlTargetElement("script", Attributes = AppendVersionAttributeName)]
public class ScriptTagHelper : UrlResolutionTagHelper
{
private const string SrcIncludeAttributeName = "asp-src-include";

View File

@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;select&gt; elements with an <c>asp-for</c> attribute.
/// </summary>
[TargetElement("select", Attributes = ForAttributeName)]
[HtmlTargetElement("select", Attributes = ForAttributeName)]
public class SelectTagHelper : TagHelper
{
private const string ForAttributeName = "asp-for";

View File

@ -9,7 +9,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;textarea&gt; elements with an <c>asp-for</c> attribute.
/// </summary>
[TargetElement("textarea", Attributes = ForAttributeName)]
[HtmlTargetElement("textarea", Attributes = ForAttributeName)]
public class TextAreaTagHelper : TagHelper
{
private const string ForAttributeName = "asp-for";

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <see cref="ITagHelper"/> implementation targeting any HTML element with an <c>asp-validation-for</c>
/// attribute.
/// </summary>
[TargetElement("span", Attributes = ValidationForAttributeName)]
[HtmlTargetElement("span", Attributes = ValidationForAttributeName)]
public class ValidationMessageTagHelper : TagHelper
{
private const string ValidationForAttributeName = "asp-validation-for";

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <see cref="ITagHelper"/> implementation targeting any HTML element with an <c>asp-validation-summary</c>
/// attribute.
/// </summary>
[TargetElement("div", Attributes = ValidationSummaryAttributeName)]
[HtmlTargetElement("div", Attributes = ValidationSummaryAttributeName)]
public class ValidationSummaryTagHelper : TagHelper
{
private const string ValidationSummaryAttributeName = "asp-validation-summary";

View File

@ -7,7 +7,7 @@ using Microsoft.Framework.WebEncoders;
namespace ActivatorWebSite.TagHelpers
{
[TargetElement("body")]
[HtmlTargetElement("body")]
public class FooterTagHelper : TagHelper
{
[HtmlAttributeNotBound]

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers
{
[TargetElement("span")]
[HtmlTargetElement("span")]
public class HiddenTagHelper : TagHelper
{
public HiddenTagHelper(IHtmlHelper htmlHelper)

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers
{
[TargetElement("div")]
[HtmlTargetElement("div")]
public class RepeatContentTagHelper : TagHelper
{
public RepeatContentTagHelper(IHtmlHelper htmlHelper)

View File

@ -7,7 +7,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers
{
[TargetElement("body")]
[HtmlTargetElement("body")]
public class TitleTagHelper : TagHelper
{
public TitleTagHelper(IHtmlHelper htmlHelper)

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace PrecompilationWebSite.TagHelpers
{
[TargetElement("root")]
[HtmlTargetElement("root")]
public class RootViewStartTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("input")]
[HtmlTargetElement("input")]
public class AddProcessedAttributeTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)

View File

@ -7,7 +7,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("p")]
[HtmlTargetElement("p")]
public class AutoLinkerTagHelper : TagHelper
{
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement(Attributes = "bold")]
[HtmlTargetElement(Attributes = "bold")]
public class BoldTagHelper : TagHelper
{
public override int Order

View File

@ -6,9 +6,9 @@ using Microsoft.AspNet.Razor.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("div")]
[TargetElement("style")]
[TargetElement("p")]
[HtmlTargetElement("div")]
[HtmlTargetElement("style")]
[HtmlTargetElement("p")]
public class ConditionTagHelper : TagHelper
{
public bool? Condition { get; set; }

View File

@ -6,7 +6,7 @@ using Microsoft.AspNet.Razor.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("nested")]
[HtmlTargetElement("nested")]
public class NestedViewImportsTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("*")]
[HtmlTargetElement("*")]
public class PrettyTagHelper : TagHelper
{
private static readonly Dictionary<string, string> PrettyTagStyles =

View File

@ -6,7 +6,7 @@ using Microsoft.AspNet.Razor.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement("root")]
[HtmlTargetElement("root")]
public class RootViewStartTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)

View File

@ -5,7 +5,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[TargetElement(Attributes = nameof(Surround))]
[HtmlTargetElement(Attributes = nameof(Surround))]
public class SurroundTagHelper : TagHelper
{
public override int Order

View File

@ -11,7 +11,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace MvcSample.Web.Components
{
[TargetElement("tag-cloud")]
[HtmlTargetElement("tag-cloud")]
[ViewComponent(Name = "Tags")]
public class TagCloudViewComponentTagHelper : ITagHelper
{