• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web.Caching.Azure
      • AzureBlobStorageCache
      • AzureBlobStorageCacheOptions
    • SixLabors.ImageSharp.Web.Providers.Azure
      • AzureBlobContainerClientOptions
      • AzureBlobStorageImageProvider
      • AzureBlobStorageImageProviderOptions
    • SixLabors.ImageSharp.Web.Resolvers.Azure
      • AzureBlobStorageCacheResolver
      • AzureBlobStorageImageResolver

    Class AzureBlobStorageCache

    Implements an Azure Blob Storage based cache.

    Inheritance
    object
    AzureBlobStorageCache
    Implements
    IImageCache
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Web.Caching.Azure
    Assembly: SixLabors.ImageSharp.Web.Providers.Azure.dll
    Syntax
    public class AzureBlobStorageCache : IImageCache

    Constructors

    | Edit this page View Source

    AzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions>)

    Initializes a new instance of the AzureBlobStorageCache class.

    Declaration
    public AzureBlobStorageCache(IOptions<AzureBlobStorageCacheOptions> cacheOptions)
    Parameters
    Type Name Description
    IOptions<AzureBlobStorageCacheOptions> cacheOptions

    The cache options.

    Methods

    | Edit this page View Source

    CreateIfNotExists(AzureBlobStorageCacheOptions, PublicAccessType)

    Creates a new container under the specified account if a container with the same name does not already exist.

    Declaration
    public static Response<BlobContainerInfo> CreateIfNotExists(AzureBlobStorageCacheOptions options, PublicAccessType accessType)
    Parameters
    Type Name Description
    AzureBlobStorageCacheOptions options

    The Azure Blob Storage cache options.

    PublicAccessType accessType

    Optionally specifies whether data in the container may be accessed publicly and the level of access. BlobContainer specifies full public read access for container and blob data. Clients can enumerate blobs within the container via anonymous request, but cannot enumerate containers within the storage account. Blob specifies public read access for blobs. Blob data within this container can be read via anonymous request, but container data is not available. Clients cannot enumerate blobs within the container via anonymous request. None specifies that the container data is private to the account owner.

    Returns
    Type Description
    Response<BlobContainerInfo>

    If the container does not already exist, a Response<T> describing the newly created container. If the container already exists, null.

    | Edit this page View Source

    GetAsync(string)

    Gets the image resolver associated with the specified key.

    Declaration
    public Task<IImageCacheResolver?> GetAsync(string key)
    Parameters
    Type Name Description
    string key

    The cache key.

    Returns
    Type Description
    Task<IImageCacheResolver>

    The IImageResolver.

    | Edit this page View Source

    SetAsync(string, Stream, ImageCacheMetadata)

    Sets the value associated with the specified key.

    Declaration
    public Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)
    Parameters
    Type Name Description
    string key

    The cache key.

    Stream stream

    The stream containing the image to store.

    ImageCacheMetadata metadata

    The ImageCacheMetadata associated with the image to store.

    Returns
    Type Description
    Task

    The task.

    Implements

    IImageCache
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX