With Opticon around the corner, we'll be canceling this month's (Sept) Happy Hour.

Class BlobServiceCollectionExtensions

Provides extension methods for Microsoft.Extensions.DependencyInjection.IServiceCollection implemenations.

Inheritance
System.Object
BlobServiceCollectionExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public static class BlobServiceCollectionExtensions : Object

Methods

AddBlobProvider<TProvider>(IServiceCollection, String)

Adds a blob provider to the CMS blob system.

Declaration
public static IServiceCollection AddBlobProvider<TProvider>(this IServiceCollection services, string name)
    where TProvider : BlobProvider
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

System.String name

The name of the provider

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service configuration provider

Type Parameters
Name Description
TProvider

The type of BlobProvider to add.

AddBlobProvider<TProvider>(IServiceCollection, String, Boolean)

Adds a blob provider to the CMS blob system.

Declaration
public static IServiceCollection AddBlobProvider<TProvider>(this IServiceCollection services, string name, bool defaultProvider)
    where TProvider : BlobProvider
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

System.String name

The name of the provider

System.Boolean defaultProvider

If true the provider will be set as the default provider

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service configuration provider

Type Parameters
Name Description
TProvider

The type of BlobProvider to add.

AddBlobProvider<TProvider, TProviderOptions>(IServiceCollection, String, Action<TProviderOptions>)

Adds a blob provider to the CMS blob system.

Declaration
public static IServiceCollection AddBlobProvider<TProvider, TProviderOptions>(this IServiceCollection services, string name, Action<TProviderOptions> configure)
    where TProvider : BlobProvider where TProviderOptions : class, new()
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

System.String name

The name of the provider

System.Action<TProviderOptions> configure

The method used to setup the provider options.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service configuration provider

Type Parameters
Name Description
TProvider

The type of BlobProvider to add.

TProviderOptions

The type of the options class used to configure the BlobProvider.

AddBlobProvider<TProvider, TProviderOptions>(IServiceCollection, String, Boolean, Action<TProviderOptions>)

Adds a blob provider to the CMS blob system.

Declaration
public static IServiceCollection AddBlobProvider<TProvider, TProviderOptions>(this IServiceCollection services, string name, bool defaultProvider, Action<TProviderOptions> configure)
    where TProvider : BlobProvider where TProviderOptions : class, new()
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

System.String name

The name of the provider

System.Boolean defaultProvider

If true the provider will be set as the default provider

System.Action<TProviderOptions> configure

The method used to setup the provider options.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service configuration provider

Type Parameters
Name Description
TProvider

The type of BlobProvider to add.

TProviderOptions

The type of the options class used to configure the BlobProvider.

AddFileBlobProvider(IServiceCollection, String, String)

Adds a FileBlobProvider to the CMS blob system configured using the provided path.

Declaration
public static IServiceCollection AddFileBlobProvider(this IServiceCollection services, string name, string path)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection services

The service collection.

System.String name

The name of the provider

System.String path

The path that the provider should use.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The service configuration provider