Class BlobProviderBuilder
Used to configure and build up BlobProvider instances on the BlobOptions class.
Inheritance
Inherited Members
Namespace: EPiServer.Framework.Blobs
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
public class BlobProviderBuilder
Constructors
BlobProviderBuilder(String, Type)
Initializes a new instance of the BlobProviderBuilder class.
Declaration
public BlobProviderBuilder(string name, Type providerType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the blob provider |
System.Type | providerType | The type of the provider instance. Must implement BlobProvider. |
Remarks
It's recommended to use the Create<TProvider>(String) method to initialize new instances as it will provide type support.
Properties
Name
Gets the name of the BlobProvider.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
ProviderType
Gets the type of the BlobProvider.
Declaration
public Type ProviderType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
Build(IServiceLocator)
Builds a new BlobProvider instance.
Declaration
public BlobProvider Build(IServiceLocator serviceLocator)
Parameters
Type | Name | Description |
---|---|---|
IServiceLocator | serviceLocator | The service locator used to create provider instances. |
Returns
Type | Description |
---|---|
BlobProvider | A new BlobProvider instance. |
Configure<TProviderOptions>(Action<TProviderOptions>)
Adds a configuration of the provider.
Declaration
public BlobProviderBuilder Configure<TProviderOptions>(Action<TProviderOptions> configure)
where TProviderOptions : class, new()
Parameters
Type | Name | Description |
---|---|---|
System.Action<TProviderOptions> | configure | A method used to configure the options for this provider. |
Returns
Type | Description |
---|---|
BlobProviderBuilder |
Type Parameters
Name | Description |
---|---|
TProviderOptions | The options type required by the provider configured by this instance. |
Create<TProvider>(String)
Factory method for creating a new BlobProviderBuilder instance.
Declaration
public static BlobProviderBuilder Create<TProvider>(string name)
where TProvider : BlobProvider
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the BlobProvider. |
Returns
Type | Description |
---|---|
BlobProviderBuilder | A new BlobProviderBuilder instance. |
Type Parameters
Name | Description |
---|---|
TProvider | Type of the provider instance. Must implement BlobProvider. |