IStorageFactory

Namespace: Proffer.Storage

Builds IStore from configured IStorageProvider.

public interface IStorageFactory

Methods

GetStore(String, IStoreOptions)

Gets a store with specific options.

IStore GetStore(string storeName, IStoreOptions configuration)

Parameters

storeName String
The name of the store.

configuration IStoreOptions
The store options.

Returns

IStore

        A configured .

Exceptions

BadProviderConfiguration

BadStoreConfiguration

ProviderNotFoundException

StoreNotFoundException

GetStore(String)

Gets a store from configured options.

IStore GetStore(string storeName)

Parameters

storeName String
The name of the store.

Returns

IStore

        A configured .

Exceptions

BadProviderConfiguration

BadStoreConfiguration

ProviderNotFoundException

StoreNotFoundException

GetScopedStore(String, Object[])

Gets a scoped store from configured options.

IStore GetScopedStore(string storeName, Object[] args)

Parameters

storeName String
The name of the scoped store.

args Object[]
The arguments to apply to the scoped store name format.

Returns

IStore

        A configured .

Exceptions

BadProviderConfiguration

BadStoreConfiguration

ProviderNotFoundException

StoreNotFoundException

BadScopedStoreConfiguration

TryGetStore(String, IStore&)

Gets a store from configured options.

bool TryGetStore(string storeName, IStore& store)

Parameters

storeName String
The name of the store.

store IStore&
When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized.

Returns

Boolean
true if the store was configured and built from its provider; otherwise, false.

Exceptions

BadProviderConfiguration

BadStoreConfiguration

ProviderNotFoundException

StoreNotFoundException

TryGetStore(String, IStore&, String)

Gets a store from configured options.

bool TryGetStore(string storeName, IStore& store, string providerName)

Parameters

storeName String
The name of the store.

store IStore&
When this method returns, contains the store associated with the specified name, if it is found in the ; otherwise, null. This parameter is passed uninitialized.

providerName String
The explicit provider name from which the store should be built.

Returns

Boolean
true if the store was configured and built from its provider; otherwise, false.

Exceptions

BadProviderConfiguration

BadStoreConfiguration

ProviderNotFoundException

StoreNotFoundException