Class DefaultBlobFactory
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. An factory class for working with binary large objects that can be handled by any registered provider
Inheritance
Inherited Members
Namespace: EPiServer.Framework.Blobs.Internal
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
public class DefaultBlobFactory : IBlobFactory, IBlobProviderRegistry
Constructors
DefaultBlobFactory()
Declaration
public DefaultBlobFactory()
DefaultBlobFactory(BlobOptions, IEnumerable<BlobProvider>)
Declaration
public DefaultBlobFactory(BlobOptions options, IEnumerable<BlobProvider> providers)
Parameters
Type | Name | Description |
---|---|---|
BlobOptions | options | |
System.Collections.Generic.IEnumerable<BlobProvider> | providers |
Properties
DefaultProvider
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The default provider
Declaration
public string DefaultProvider { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddProvider(BlobProvider)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Register a blob provider
Declaration
public virtual void AddProvider(BlobProvider provider)
Parameters
Type | Name | Description |
---|---|---|
BlobProvider | provider | The provider to register |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when provider or its name is null or empty |
Create(BlobOptions, IServiceLocator)
Declaration
public static DefaultBlobFactory Create(BlobOptions options, IServiceLocator serviceLocator)
Parameters
Type | Name | Description |
---|---|---|
BlobOptions | options | |
IServiceLocator | serviceLocator |
Returns
Type | Description |
---|---|
DefaultBlobFactory |
CreateBlob(Uri, String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get a reference to a blob
Declaration
public virtual Blob CreateBlob(Uri id, string extension)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | id | The identifier of the container |
System.String | extension | The extension (such as ".png") |
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
Delete(Uri)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Delete a blob or a container
Declaration
public virtual 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)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get a reference to a blob
Declaration
public virtual 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
GetProvider(Uri)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Get the provider for a blob authority
Declaration
public virtual BlobProvider GetProvider(Uri id)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | id | The blob identifier |
Returns
Type | Description |
---|---|
BlobProvider | A blob provider |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if no matching provider was found |
RemoveProvider(String)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Unregister a blob provider
Declaration
public virtual bool RemoveProvider(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the provider (also used as authority in blob ID) |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
Remarks
Provider names are not case sensitive