Table of Contents

Class ServiceCollectionExtensions

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

Extension methods for IServiceCollection to simplify middleware service registration.

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

AddImageSharp(IServiceCollection)

Adds ImageSharp services to the specified IServiceCollection with the default options.

public static IImageSharpBuilder AddImageSharp(this IServiceCollection services)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

Returns

IImageSharpBuilder

An IImageSharpBuilder that can be used to further configure the ImageSharp services.

AddImageSharp(IServiceCollection, Action<ImageSharpMiddlewareOptions>)

Adds ImageSharp services to the specified IServiceCollection with the given options.

public static IImageSharpBuilder AddImageSharp(this IServiceCollection services, Action<ImageSharpMiddlewareOptions> setupAction)

Parameters

services IServiceCollection

The IServiceCollection to add services to.

setupAction Action<ImageSharpMiddlewareOptions>

An Action<T> to configure the provided ImageSharpMiddlewareOptions.

Returns

IImageSharpBuilder

An IImageSharpBuilder that can be used to further configure the ImageSharp services.