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>
/// <see cref="ITagHelper"/> implementation targeting &lt;a&gt; elements.
/// </summary>
[HtmlElementName("a")]
[TargetElement("a")]
public class AnchorTagHelper : TagHelper
{
private const string ActionAttributeName = "asp-action";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ using Microsoft.AspNet.Razor.Runtime.TagHelpers;
namespace TagHelpersWebSite.TagHelpers
{
[HtmlElementName("*")]
[TargetElement("*")]
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
{
[HtmlElementName("root")]
[TargetElement("root")]
public class RootViewStartTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)

View File

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