Show / Hide Table of Contents

    Class ImageCdnTagHelper

    CdnTagHelper implementation targeting <img> elements that supports ICacheBusting versioning. This class cannot be inherited. Implements the CdnTagHelper

    Inheritance
    System.Object
    Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
    CdnTagHelper
    ImageCdnTagHelper
    Implements
    Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper
    Microsoft.AspNetCore.Razor.TagHelpers.ITagHelperComponent
    IConfigurable<CdnTagHelperOptions>
    Inherited Members
    CdnTagHelper.CacheBusting
    CdnTagHelper.UseCacheBusting
    CdnTagHelper.Options
    CdnTagHelper.GetBaseUrl()
    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-img")]
    public sealed class ImageCdnTagHelper : CdnTagHelper, ITagHelper, ITagHelperComponent, IConfigurable<CdnTagHelperOptions>

    Constructors

    | Improve this Doc

    ImageCdnTagHelper(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 Doc

    Alt

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    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 Doc

    ProcessAsync(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 output.

    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
    IConfigurable<TOptions>

    Extension Methods

    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Byte[], Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, Byte[]>, Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Byte[], Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Byte[], Action<ContentTimeBasedOptions>)

    See Also

    CdnTagHelper
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX