Class BlobProvider
An abstract provider for binary large objects
Inherited Members
Namespace: EPiServer.Framework.Blobs
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
public abstract class BlobProvider
Constructors
BlobProvider()
Declaration
protected BlobProvider()
Properties
Name
Gets the friendly name used to refer to the provider
Declaration
public virtual string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Default name is 'default'
Methods
CreateBlob(Uri, String)
Create a reference to a new blob
Declaration
public abstract Blob CreateBlob(Uri id, string extension)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | id | The identifier of the container |
System.String | extension | The extention (such as .png) |
Returns
Type | Description |
---|---|
Blob | A reference to a blob |
Delete(Uri)
Delete a blob or a container
Declaration
public abstract void Delete(Uri id)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | id | The identifier of a blob or a blob container |
Remarks
The Host part of the identifier is the container and the path is the file/blob that is being deleted. If the file is missing it is assumed that the container is being deleted.
GetBlob(Uri)
Get a reference to a blob
Declaration
public abstract Blob GetBlob(Uri id)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | id | The identifier |
Returns
Type | Description |
---|---|
Blob | A reference to a blob |
Remarks
This method will always return a reference even though the actual blob does not exists
Initialize(String, NameValueCollection)
Initializes the provider.
Declaration
public virtual void Initialize(string name, NameValueCollection config)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The friendly name of the provider |
System.Collections.Specialized.NameValueCollection | config | A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider. |
InitializeAsync()
Override this method if the provider has some time consuming initialization that can be done parallell with other initalization modules.
Declaration
public virtual Task InitializeAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method will be called during Initialize(InitializationEngine) and then in InitComplete it will wait for the ongoing task to complete.