Class ImageCdnTagHelper
CdnTagHelper implementation targeting <img> elements that supports ICacheBusting versioning. This class cannot be inherited. Implements the CdnTagHelper
Inheritance
Implements
Inherited Members
Namespace: Cuemon.AspNetCore.Razor.TagHelpers
Assembly: Cuemon.AspNetCore.Razor.TagHelpers.dll
Syntax
[HtmlTargetElement("cdn-img")]
public sealed class ImageCdnTagHelper : CdnTagHelper, ITagHelper, ITagHelperComponent, IConfigurable<CdnTagHelperOptions>
Constructors
| Improve this DocImageCdnTagHelper(IOptions<CdnTagHelperOptions>, ICacheBusting)
Initializes a new instance of the ImageCdnTagHelper class.
Declaration
public ImageCdnTagHelper(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 DocAlt
Gets or sets the alternative text of the image.
Declaration
public string Alt { get; set; }
Property Value
Type | Description |
---|---|
System.String | The alternative text of the image. |
Class
Gets or sets the class name of the image.
Declaration
public string Class { get; set; }
Property Value
Type | Description |
---|---|
System.String | The class name of the image. |
Id
Gets or sets the identifier of the image.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String | The identifier of the image. |
Src
Gets or sets the source of the image.
Declaration
public string Src { get; set; }
Property Value
Type | Description |
---|---|
System.String | The source of the image. |
Title
Gets or sets the title of the image.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title of the image. |
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 |