Class LinkCdnTagHelper
CdnTagHelper implementation targeting <link> elements that supports ICacheBusting versioning. This class cannot be inherited. Implements the CdnTagHelper
Inheritance
System.Object
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
LinkCdnTagHelper
Implements
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent
Inherited Members
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Init(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext)
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.Order
Namespace: Cuemon.AspNetCore.Razor.TagHelpers
Assembly: Cuemon.AspNetCore.Razor.TagHelpers.dll
Syntax
[HtmlTargetElement("cdn-link")]
public sealed class LinkCdnTagHelper : CdnTagHelper, ITagHelper, ITagHelperComponent, IConfigurable<CdnTagHelperOptions>
Constructors
| Improve this DocLinkCdnTagHelper(IOptions<CdnTagHelperOptions>, ICacheBusting)
Initializes a new instance of the LinkCdnTagHelper class.
Declaration
public LinkCdnTagHelper(IOptions<CdnTagHelperOptions> setup, ICacheBusting cacheBusting = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<CdnTagHelperOptions> | setup | The CdnTagHelperOptions which need to be configured. |
ICacheBusting | cacheBusting | An optional object implementing the ICacheBusting interface. |
Properties
| Improve this DocHref
Gets or sets the location of the link.
Declaration
public string Href { get; set; }
Property Value
Type | Description |
---|---|
System.String | The location of the link. |
Rel
Gets or sets the relation of the link.
Declaration
public string Rel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The relation of the link. |
Type
Gets or sets the type of the link.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | The type of the link. |
Methods
| Improve this DocProcessAsync(TagHelperContext, TagHelperOutput)
Asynchronously executes the TagHelper with the given context
and output
.
Declaration
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext | context | Contains information associated with the current HTML tag. |
Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput | output | A stateful HTML element used to generate an HTML tag. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task that on completion updates the |
Overrides
Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)
Implements
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent