Class StorageManagerFactory
The factory the system uses to retrieve an IStorageManager implementation according to the StorageType config settings
Inheritance
Inherited Members
Namespace: LemonEdge.API.Storage
Assembly: API.dll
Syntax
public static class StorageManagerFactory
Properties
ValidStorageTypes
Returns a list of the keys for all valid storage implementations that the system can use
Declaration
public static IEnumerable<string> ValidStorageTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Methods
Create()
Creates an IStorageManager from the config settings
Uses the configured StorageType, StorageConnectionString, and StorageBasePath
Declaration
public static IStorageManager Create()
Returns
Type | Description |
---|---|
IStorageManager | A task holding the newly created Storage Manager |
Create(String, String, String)
Creates an IStorageManager from the specified settings
Declaration
public static IStorageManager Create(string storageTypeKey, string connectionString, string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | storageTypeKey | The type of storage to use for saving task server results. System keys are Local and Azure. |
System.String | connectionString | The default connection string to the storage type. For azure this is an azure storage connection string, for a local drive it's just the drive name |
System.String | basePath | The base path to store everything in the storage type. For Azure this is a container, for a local file system it's just a folder path. |
Returns
Type | Description |
---|---|
IStorageManager | A task holding the newly created Storage Manager |