TagHelperAttributeDescriptor Class

A metadata class describing a tag helper attribute.

Namespace
Microsoft.AspNetCore.Razor.Compilation.TagHelpers
Assemblies
  • Microsoft.AspNetCore.Razor

Syntax

public class TagHelperAttributeDescriptor
class Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor

Constructors

TagHelperAttributeDescriptor()

Instantiates a new instance of the Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor class.

public TagHelperAttributeDescriptor()

Properties

Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.DesignTimeDescriptor

The Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDesignTimeDescriptor that contains design time information about this attribute.

Return type:Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDesignTimeDescriptor
public TagHelperAttributeDesignTimeDescriptor DesignTimeDescriptor { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsEnum

Gets or sets an indication whether this property is an System.Enum.

Return type:System.Boolean
public bool IsEnum { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsIndexer

Gets an indication whether this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor is used for dictionary indexer assignments.

Return type:System.Boolean
Returns:If <code>true</code> this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor should be associated with all HTML attributes that have names starting with Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.Name. Otherwise this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor is used for property assignment and is only associated with an HTML attribute that has the exact Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.Name.
public bool IsIndexer { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsStringProperty

Gets or sets an indication whether this property is of type System.String or, if Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsIndexer is <code>true</code>, whether the indexer’s value is of type System.String.

Return type:System.Boolean
Returns:If <code>true</code> the Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.TypeName is for System.String. This causes the Razor parser to allow empty values for HTML attributes matching this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor. If <code>false</code> empty values for such matching attributes lead to errors.
public bool IsStringProperty { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.Name

The HTML attribute name or, if Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsIndexer is <code>true</code>, the prefix for matching attribute names.

Return type:System.String
public string Name { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.PropertyName

The name of the CLR property that corresponds to the HTML attribute.

Return type:System.String
public string PropertyName { get; set; }
Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.TypeName

The full name of the named (see <see name=”PropertyName”></see>) property’s System.Type or, if Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.IsIndexer is <code>true</code>, the full name of the indexer’s value System.Type.

Return type:System.String
public string TypeName { get; set; }

Methods

IsNameMatch(System.String)

Determines whether HTML attribute <em>name</em> matches this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor.

Arguments:name (System.String) – Name of the HTML attribute to check.
Return type:System.Boolean
Returns:<code>true</code> if this Microsoft.AspNetCore.Razor.Compilation.TagHelpers.TagHelperAttributeDescriptor matches <em>name</em>. <code>false</code> otherwise.
public bool IsNameMatch(string name)