• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • CaseHandlingUriBuilder
      • CaseHandlingUriBuilder.CaseHandling
      • CommandHandling
      • ExifOrientationUtilities
      • Format
      • FormatCommand
      • FormatUtilities
      • FormattedImage
      • HMACUtilities
      • ImageCacheMetadata
      • ImageMetadata
      • RequestAuthorizationUtilities
      • Resampler
      • ResamplerCommand
    • SixLabors.ImageSharp.Web.Caching
      • ICacheHash
      • ICacheKey
      • IImageCache
      • LegacyV1CacheKey
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
      • SHA256CacheHash
      • UriAbsoluteCacheKey
      • UriAbsoluteLowerInvariantCacheKey
      • UriRelativeCacheKey
      • UriRelativeLowerInvariantCacheKey
    • SixLabors.ImageSharp.Web.Commands
      • CommandCollection
      • CommandCollectionExtensions
      • CommandParser
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ArrayConverter<T>
      • ColorConverter
      • EnumConverter
      • ICommandConverter
      • ICommandConverter<T>
      • IntegralNumberConverter<T>
      • ListConverter<T>
      • SimpleCommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • AutoOrientWebProcessor
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • QualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • FileProviderImageProvider
      • IImageProvider
      • PhysicalFileSystemProvider
      • PhysicalFileSystemProviderOptions
      • ProcessingBehavior
      • WebRootImageProvider
    • SixLabors.ImageSharp.Web.Resolvers
      • FileProviderImageResolver
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>
    • SixLabors.ImageSharp.Web.TagHelpers
      • HmacTokenTagHelper
      • ImageTagHelper

    Class ImageSharpBuilderExtensions

    Extension methods for IImageSharpBuilder that allow configuration of services.

    Inheritance
    object
    ImageSharpBuilderExtensions
    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.DependencyInjection
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public static class ImageSharpBuilderExtensions

    Methods

    | Edit this page View Source

    AddConverter<TConverter>(IImageSharpBuilder)

    Adds the given ICommandConverter to the converter collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddConverter<TConverter>(this IImageSharpBuilder builder) where TConverter : class, ICommandConverter
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TConverter

    The type of class implementing ICommandConverter to add.

    | Edit this page View Source

    AddConverter<TConverter>(IImageSharpBuilder, Func<IServiceProvider, TConverter>)

    Adds the given ICommandConverter to the converter collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddConverter<TConverter>(this IImageSharpBuilder builder, Func<IServiceProvider, TConverter> implementationFactory) where TConverter : class, ICommandConverter
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, TConverter> implementationFactory

    The factory method for returning a ICommandConverter.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TConverter

    The type of class implementing ICommandConverter to add.

    | Edit this page View Source

    AddProcessor<T>(IImageSharpBuilder)

    Adds the given IImageWebProcessor to the processor collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddProcessor<T>(this IImageSharpBuilder builder) where T : class, IImageWebProcessor
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    T

    The type of class implementing IImageWebProcessor to add.

    | Edit this page View Source

    AddProcessor<TProcessor>(IImageSharpBuilder, Func<IServiceProvider, TProcessor>)

    Adds the given IImageWebProcessor to the processor collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddProcessor<TProcessor>(this IImageSharpBuilder builder, Func<IServiceProvider, TProcessor> implementationFactory) where TProcessor : class, IImageWebProcessor
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, TProcessor> implementationFactory

    The factory method for returning a IImageProvider.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProcessor

    The type of class implementing IImageWebProcessor to add.

    | Edit this page View Source

    AddProvider<TProvider>(IImageSharpBuilder)

    Adds the given IImageProvider to the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddProvider<TProvider>(this IImageSharpBuilder builder) where TProvider : class, IImageProvider
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProvider

    The type of class implementing IImageProvider to add.

    | Edit this page View Source

    AddProvider<TProvider>(IImageSharpBuilder, Func<IServiceProvider, TProvider>)

    Adds the given IImageProvider to the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder AddProvider<TProvider>(this IImageSharpBuilder builder, Func<IServiceProvider, TProvider> implementationFactory) where TProvider : class, IImageProvider
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, TProvider> implementationFactory

    The factory method for returning a IImageProvider.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProvider

    The type of class implementing IImageProvider to add.

    | Edit this page View Source

    ClearConverters(IImageSharpBuilder)

    Removes all ICommandConverter instances from the converter collection within the service collection.

    Declaration
    public static IImageSharpBuilder ClearConverters(this IImageSharpBuilder builder)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    ClearProcessors(IImageSharpBuilder)

    Removes all IImageWebProcessor instances from the processor collection within the service collection.

    Declaration
    public static IImageSharpBuilder ClearProcessors(this IImageSharpBuilder builder)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    ClearProviders(IImageSharpBuilder)

    Removes all IImageProvider instances from the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder ClearProviders(this IImageSharpBuilder builder)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    Configure<TOptions>(IImageSharpBuilder, IConfiguration)

    Registers an action used to configure a particular type of options.

    Declaration
    public static IImageSharpBuilder Configure<TOptions>(this IImageSharpBuilder builder, IConfiguration config) where TOptions : class
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    IConfiguration config

    The configuration being bound.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TOptions

    The options type to be configured.

    | Edit this page View Source

    Configure<TOptions>(IImageSharpBuilder, Action<TOptions>)

    Registers an action used to configure a particular type of options.

    Declaration
    public static IImageSharpBuilder Configure<TOptions>(this IImageSharpBuilder builder, Action<TOptions> configureOptions) where TOptions : class
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Action<TOptions> configureOptions

    The action used to configure the options.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TOptions

    The options type to be configured.

    | Edit this page View Source

    InsertProvider<TProvider>(IImageSharpBuilder, int)

    Inserts the given IImageProvider at the give index into to the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder InsertProvider<TProvider>(this IImageSharpBuilder builder, int index) where TProvider : class, IImageProvider
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    int index

    The zero-based index at which the provider should be inserted.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProvider

    The type of class implementing IImageProvider to add.

    | Edit this page View Source

    InsertProvider<TProvider>(IImageSharpBuilder, int, Func<IServiceProvider, TProvider>)

    Inserts the given IImageProvider at the give index into the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder InsertProvider<TProvider>(this IImageSharpBuilder builder, int index, Func<IServiceProvider, TProvider> implementationFactory) where TProvider : class, IImageProvider
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    int index

    The zero-based index at which the provider should be inserted.

    Func<IServiceProvider, TProvider> implementationFactory

    The factory method for returning a IImageProvider.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProvider

    The type of class implementing IImageProvider to add.

    | Edit this page View Source

    RemoveConverter<TConverter>(IImageSharpBuilder)

    Removes the given ICommandConverter from the converter collection within the service collection.

    Declaration
    public static IImageSharpBuilder RemoveConverter<TConverter>(this IImageSharpBuilder builder) where TConverter : class, ICommandConverter
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TConverter

    The type of class implementing ICommandConverter to add.

    | Edit this page View Source

    RemoveProcessor<TProcessor>(IImageSharpBuilder)

    Removes the given IImageWebProcessor from the processor collection within the service collection.

    Declaration
    public static IImageSharpBuilder RemoveProcessor<TProcessor>(this IImageSharpBuilder builder) where TProcessor : class, IImageWebProcessor
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProcessor

    The type of class implementing IImageWebProcessor to add.

    | Edit this page View Source

    RemoveProvider<TProvider>(IImageSharpBuilder)

    Removes the given IImageProvider from the provider collection within the service collection.

    Declaration
    public static IImageSharpBuilder RemoveProvider<TProvider>(this IImageSharpBuilder builder) where TProvider : class, IImageProvider
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TProvider

    The type of class implementing IImageProvider to add.

    | Edit this page View Source

    SetCache(IImageSharpBuilder, Func<IServiceProvider, IImageCache>)

    Sets the given IImageCache adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCache(this IImageSharpBuilder builder, Func<IServiceProvider, IImageCache> implementationFactory)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, IImageCache> implementationFactory

    The factory method for returning a IImageCache.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    SetCacheHash(IImageSharpBuilder, Func<IServiceProvider, ICacheHash>)

    Sets the given ICacheHash adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCacheHash(this IImageSharpBuilder builder, Func<IServiceProvider, ICacheHash> implementationFactory)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, ICacheHash> implementationFactory

    The factory method for returning a ICacheHash.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    SetCacheHash<TCacheHash>(IImageSharpBuilder)

    Sets the given ICacheHash adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCacheHash<TCacheHash>(this IImageSharpBuilder builder) where TCacheHash : class, ICacheHash
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TCacheHash

    The type of class implementing ICacheHash to add.

    | Edit this page View Source

    SetCacheKey(IImageSharpBuilder, Func<IServiceProvider, ICacheKey>)

    Sets the given ICacheKey adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCacheKey(this IImageSharpBuilder builder, Func<IServiceProvider, ICacheKey> implementationFactory)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, ICacheKey> implementationFactory

    The factory method for returning a ICacheKey.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    SetCacheKey<TCacheKey>(IImageSharpBuilder)

    Sets the given ICacheKey adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCacheKey<TCacheKey>(this IImageSharpBuilder builder) where TCacheKey : class, ICacheKey
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TCacheKey

    The type of class implementing ICacheKey to add.

    | Edit this page View Source

    SetCache<TCache>(IImageSharpBuilder)

    Sets the given IImageCache adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetCache<TCache>(this IImageSharpBuilder builder) where TCache : class, IImageCache
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TCache

    The type of class implementing IImageCache to add.

    | Edit this page View Source

    SetRequestParser(IImageSharpBuilder, Func<IServiceProvider, IRequestParser>)

    Sets the given IRequestParser adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetRequestParser(this IImageSharpBuilder builder, Func<IServiceProvider, IRequestParser> implementationFactory)
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Func<IServiceProvider, IRequestParser> implementationFactory

    The factory method for returning a IRequestParser.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    | Edit this page View Source

    SetRequestParser<TParser>(IImageSharpBuilder)

    Sets the given IRequestParser adding it to the service collection.

    Declaration
    public static IImageSharpBuilder SetRequestParser<TParser>(this IImageSharpBuilder builder) where TParser : class, IRequestParser
    Parameters
    Type Name Description
    IImageSharpBuilder builder

    The core builder.

    Returns
    Type Description
    IImageSharpBuilder

    The IImageSharpBuilder.

    Type Parameters
    Name Description
    TParser

    The type of class implementing IRequestParser to add.

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