Remove second public ctor from TagHelperDescriptor.

- TagHelperDescriptors are serialized/deserialized regularly, they can't have more than 1 ctor.
This commit is contained in:
N. Taylor Mullen 2015-03-06 16:21:25 -08:00
parent bd9d57d33e
commit ecd468b166
2 changed files with 8 additions and 14 deletions

View File

@ -41,10 +41,12 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
var attributeDescriptors = GetAttributeDescriptors(type);
return tagNames.Select(tagName =>
new TagHelperDescriptor(tagName,
typeName,
assemblyName,
attributeDescriptors));
new TagHelperDescriptor(
prefix: string.Empty,
tagName: tagName,
typeName: typeName,
assemblyName: assemblyName,
attributes: attributeDescriptors));
}
private static IEnumerable<string> GetTagNames(Type tagHelperType)

View File

@ -26,17 +26,9 @@ namespace Microsoft.AspNet.Razor.TagHelpers
}
/// <summary>
/// Instantiates a new instance of the <see cref="TagHelperDescriptor"/> class with the given
/// <paramref name="attributes"/>.
/// Internal for testing.
/// </summary>
/// <param name="tagName">The tag name that the tag helper targets. '*' indicates a catch-all
/// <see cref="TagHelperDescriptor"/> which applies to every HTML tag.</param>
/// <param name="typeName">The full name of the tag helper class.</param>
/// <param name="assemblyName">The name of the assembly containing the tag helper class.</param>
/// <param name="attributes">
/// The <see cref="TagHelperAttributeDescriptor"/>s to request from the HTML tag.
/// </param>
public TagHelperDescriptor(
internal TagHelperDescriptor(
[NotNull] string tagName,
[NotNull] string typeName,
[NotNull] string assemblyName,