React to HtmlElementName rename to TargetElement.

aspnet/Razor#311
This commit is contained in:
N. Taylor Mullen 2015-03-17 22:03:11 -07:00
parent fc9e1caf43
commit 52c1c20967
15 changed files with 17 additions and 15 deletions

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
/// <summary> /// <summary>
/// <see cref="ITagHelper"/> implementation targeting &lt;a&gt; elements. /// <see cref="ITagHelper"/> implementation targeting &lt;a&gt; elements.
/// </summary> /// </summary>
[HtmlElementName("a")] [TargetElement("a")]
public class AnchorTagHelper : TagHelper public class AnchorTagHelper : TagHelper
{ {
private const string ActionAttributeName = "asp-action"; private const string ActionAttributeName = "asp-action";

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers namespace ActivatorWebSite.TagHelpers
{ {
[HtmlElementName("body")] [TargetElement("body")]
public class FooterTagHelper : TagHelper public class FooterTagHelper : TagHelper
{ {
[Activate] [Activate]

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers namespace ActivatorWebSite.TagHelpers
{ {
[HtmlElementName("span")] [TargetElement("span")]
public class HiddenTagHelper : TagHelper public class HiddenTagHelper : TagHelper
{ {
public string Name { get; set; } public string Name { get; set; }

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace ActivatorWebSite.TagHelpers namespace ActivatorWebSite.TagHelpers
{ {
[HtmlElementName("div")] [TargetElement("div")]
public class RepeatContentTagHelper : TagHelper public class RepeatContentTagHelper : TagHelper
{ {
public int RepeatContent { get; set; } public int RepeatContent { get; set; }

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.TagHelpers;
namespace ActivatorWebSite.TagHelpers namespace ActivatorWebSite.TagHelpers
{ {
[HtmlElementName("body")] [TargetElement("body")]
public class TitleTagHelper : TagHelper public class TitleTagHelper : TagHelper
{ {
[Activate] [Activate]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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