Table of Contents

Class ImageSharpBuilderExtensions

Namespace
SixLabors.ImageSharp.Web
Assembly
SixLabors.ImageSharp.Web.dll

Extension methods for IImageSharpBuilder that allow configuration of services.

public static class ImageSharpBuilderExtensions
Inheritance
ImageSharpBuilderExtensions
Inherited Members

Methods

AddConverter<TConverter>(IImageSharpBuilder)

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

public static IImageSharpBuilder AddConverter<TConverter>(this IImageSharpBuilder builder) where TConverter : class, ICommandConverter

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TConverter

The type of class implementing ICommandConverter to add.

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

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

public static IImageSharpBuilder AddConverter<TConverter>(this IImageSharpBuilder builder, Func<IServiceProvider, TConverter> implementationFactory) where TConverter : class, ICommandConverter

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, TConverter>

The factory method for returning a ICommandConverter.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TConverter

The type of class implementing ICommandConverter to add.

AddProcessor<T>(IImageSharpBuilder)

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

public static IImageSharpBuilder AddProcessor<T>(this IImageSharpBuilder builder) where T : class, IImageWebProcessor

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

T

The type of class implementing IImageWebProcessor to add.

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

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

public static IImageSharpBuilder AddProcessor<TProcessor>(this IImageSharpBuilder builder, Func<IServiceProvider, TProcessor> implementationFactory) where TProcessor : class, IImageWebProcessor

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, TProcessor>

The factory method for returning a IImageProvider.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProcessor

The type of class implementing IImageWebProcessor to add.

AddProvider<TProvider>(IImageSharpBuilder)

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

public static IImageSharpBuilder AddProvider<TProvider>(this IImageSharpBuilder builder) where TProvider : class, IImageProvider

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProvider

The type of class implementing IImageProvider to add.

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

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

public static IImageSharpBuilder AddProvider<TProvider>(this IImageSharpBuilder builder, Func<IServiceProvider, TProvider> implementationFactory) where TProvider : class, IImageProvider

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, TProvider>

The factory method for returning a IImageProvider.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProvider

The type of class implementing IImageProvider to add.

ClearConverters(IImageSharpBuilder)

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

public static IImageSharpBuilder ClearConverters(this IImageSharpBuilder builder)

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

ClearProcessors(IImageSharpBuilder)

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

public static IImageSharpBuilder ClearProcessors(this IImageSharpBuilder builder)

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

ClearProviders(IImageSharpBuilder)

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

public static IImageSharpBuilder ClearProviders(this IImageSharpBuilder builder)

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Configure<TOptions>(IImageSharpBuilder, IConfiguration)

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

[RequiresDynamicCode("Binding strongly typed objects to configuration values may require generating dynamic code at runtime.")]
[RequiresUnreferencedCode("TOptions's dependent types may have their members trimmed. Ensure all required members are preserved.")]
public static IImageSharpBuilder Configure<TOptions>(this IImageSharpBuilder builder, IConfiguration config) where TOptions : class

Parameters

builder IImageSharpBuilder

The core builder.

config IConfiguration

The configuration being bound.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TOptions

The options type to be configured.

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

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

public static IImageSharpBuilder Configure<TOptions>(this IImageSharpBuilder builder, Action<TOptions> configureOptions) where TOptions : class

Parameters

builder IImageSharpBuilder

The core builder.

configureOptions Action<TOptions>

The action used to configure the options.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TOptions

The options type to be configured.

InsertProvider<TProvider>(IImageSharpBuilder, int)

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

public static IImageSharpBuilder InsertProvider<TProvider>(this IImageSharpBuilder builder, int index) where TProvider : class, IImageProvider

Parameters

builder IImageSharpBuilder

The core builder.

index int

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

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProvider

The type of class implementing IImageProvider to add.

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

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

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

Parameters

builder IImageSharpBuilder

The core builder.

index int

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

implementationFactory Func<IServiceProvider, TProvider>

The factory method for returning a IImageProvider.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProvider

The type of class implementing IImageProvider to add.

RemoveConverter<TConverter>(IImageSharpBuilder)

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

public static IImageSharpBuilder RemoveConverter<TConverter>(this IImageSharpBuilder builder) where TConverter : class, ICommandConverter

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TConverter

The type of class implementing ICommandConverter to add.

RemoveProcessor<TProcessor>(IImageSharpBuilder)

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

public static IImageSharpBuilder RemoveProcessor<TProcessor>(this IImageSharpBuilder builder) where TProcessor : class, IImageWebProcessor

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProcessor

The type of class implementing IImageWebProcessor to add.

RemoveProvider<TProvider>(IImageSharpBuilder)

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

public static IImageSharpBuilder RemoveProvider<TProvider>(this IImageSharpBuilder builder) where TProvider : class, IImageProvider

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TProvider

The type of class implementing IImageProvider to add.

SetCache(IImageSharpBuilder, Func<IServiceProvider, IImageCache>)

Sets the given IImageCache adding it to the service collection.

public static IImageSharpBuilder SetCache(this IImageSharpBuilder builder, Func<IServiceProvider, IImageCache> implementationFactory)

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, IImageCache>

The factory method for returning a IImageCache.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

SetCacheHash(IImageSharpBuilder, Func<IServiceProvider, ICacheHash>)

Sets the given ICacheHash adding it to the service collection.

public static IImageSharpBuilder SetCacheHash(this IImageSharpBuilder builder, Func<IServiceProvider, ICacheHash> implementationFactory)

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, ICacheHash>

The factory method for returning a ICacheHash.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

SetCacheHash<TCacheHash>(IImageSharpBuilder)

Sets the given ICacheHash adding it to the service collection.

public static IImageSharpBuilder SetCacheHash<TCacheHash>(this IImageSharpBuilder builder) where TCacheHash : class, ICacheHash

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TCacheHash

The type of class implementing ICacheHash to add.

SetCacheKey(IImageSharpBuilder, Func<IServiceProvider, ICacheKey>)

Sets the given ICacheKey adding it to the service collection.

public static IImageSharpBuilder SetCacheKey(this IImageSharpBuilder builder, Func<IServiceProvider, ICacheKey> implementationFactory)

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, ICacheKey>

The factory method for returning a ICacheKey.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

SetCacheKey<TCacheKey>(IImageSharpBuilder)

Sets the given ICacheKey adding it to the service collection.

public static IImageSharpBuilder SetCacheKey<TCacheKey>(this IImageSharpBuilder builder) where TCacheKey : class, ICacheKey

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TCacheKey

The type of class implementing ICacheKey to add.

SetCache<TCache>(IImageSharpBuilder)

Sets the given IImageCache adding it to the service collection.

public static IImageSharpBuilder SetCache<TCache>(this IImageSharpBuilder builder) where TCache : class, IImageCache

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TCache

The type of class implementing IImageCache to add.

SetRequestParser(IImageSharpBuilder, Func<IServiceProvider, IRequestParser>)

Sets the given IRequestParser adding it to the service collection.

public static IImageSharpBuilder SetRequestParser(this IImageSharpBuilder builder, Func<IServiceProvider, IRequestParser> implementationFactory)

Parameters

builder IImageSharpBuilder

The core builder.

implementationFactory Func<IServiceProvider, IRequestParser>

The factory method for returning a IRequestParser.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

SetRequestParser<TParser>(IImageSharpBuilder)

Sets the given IRequestParser adding it to the service collection.

public static IImageSharpBuilder SetRequestParser<TParser>(this IImageSharpBuilder builder) where TParser : class, IRequestParser

Parameters

builder IImageSharpBuilder

The core builder.

Returns

IImageSharpBuilder

The IImageSharpBuilder.

Type Parameters

TParser

The type of class implementing IRequestParser to add.