Class ServiceCollectionExtensions
Extension methods for IServiceCollection to simplify middleware service registration.
Inherited Members
Namespace: SixLabors.ImageSharp.Web.DependencyInjection
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public static class ServiceCollectionExtensions
Methods
| Improve this Doc View SourceAddImageSharp(IServiceCollection)
Adds ImageSharp services to the specified IServiceCollection with the default options.
Declaration
public static IImageSharpBuilder AddImageSharp(this IServiceCollection services)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection to add services to. |
Returns
Type | Description |
---|---|
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.
Declaration
public static IImageSharpBuilder AddImageSharp(this IServiceCollection services, Action<ImageSharpMiddlewareOptions> setupAction)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection to add services to. |
Action<ImageSharpMiddlewareOptions> | setupAction | An Action<T> to configure the provided ImageSharpMiddlewareOptions. |
Returns
Type | Description |
---|---|
IImageSharpBuilder | An IImageSharpBuilder that can be used to further configure the ImageSharp services. |