Class LinkTagHelper<TOptions>
- Namespace
- Cuemon.AspNetCore.Razor.TagHelpers
- Assembly
- Cuemon.AspNetCore.Razor.TagHelpers.dll
Provides a base-class for targeting <link> elements that supports ICacheBusting versioning.
public abstract class LinkTagHelper<TOptions> : CacheBustingTagHelper<TOptions>, ITagHelper, ITagHelperComponent, IConfigurable<TOptions> where TOptions : TagHelperOptions, new()
Type Parameters
TOptions
- Inheritance
-
CacheBustingTagHelper<TOptions>LinkTagHelper<TOptions>
- Implements
-
IConfigurable<TOptions>
- Derived
- Inherited Members
Constructors
LinkTagHelper(IOptions<TOptions>, ICacheBusting)
Initializes a new instance of the LinkTagHelper<TOptions> class.
protected LinkTagHelper(IOptions<TOptions> setup, ICacheBusting cacheBusting = null)
Parameters
setupIOptions<TOptions>The
TOptionswhich need to be configured.cacheBustingICacheBustingAn optional object implementing the ICacheBusting interface.
Properties
Href
Gets or sets the location of the link.
public string Href { get; set; }
Property Value
- string
The location of the link.
Rel
Gets or sets the relation of the link.
public string Rel { get; set; }
Property Value
- string
The relation of the link.
Type
Gets or sets the type of the link.
public string Type { get; set; }
Property Value
- string
The type of the link.
Methods
ProcessAsync(TagHelperContext, TagHelperOutput)
Asynchronously executes the TagHelper with the given context and output.
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters
contextTagHelperContextContains information associated with the current HTML tag.
outputTagHelperOutputA stateful HTML element used to generate an HTML tag.
Returns
- Task
A Task that on completion updates the
output.
See Also
CacheBustingTagHelper<TOptions>