Search Results for

    Show / Hide Table of Contents

    Class StoreService

    Inheritance
    System.Object
    StoreService
    Implements
    IStoreService
    Namespace: DirectScale.Disco.Extension.Services
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public class StoreService : Object, IStoreService

    Constructors

    StoreService(IApiService)

    Declaration
    public StoreService(IApiService apiService)
    Parameters
    Type Name Description
    IApiService apiService

    Methods

    CreateStore(Store)

    Creates a new Custom store.

    Declaration
    public Task<Store> CreateStore(Store store)
    Parameters
    Type Name Description
    Store store

    New store.

    Returns
    Type Description
    System.Threading.Tasks.Task<Store>

    Same object, but with Id populated.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Null value supplied.

    System.ArgumentException

    Store has no name or is not Custom.

    System.InvalidOperationException

    No default store is set or store is the new default store, but doesn't AllowOrdering.

    See Also
    UpdateStore(Store)

    DeleteStore(Int32)

    Deletes the storeId record, if it exists.

    Declaration
    public Task DeleteStore(int storeId)
    Parameters
    Type Name Description
    System.Int32 storeId

    The store's DB recordnumber.

    Returns
    Type Description
    System.Threading.Tasks.Task
    Remarks

    Does nothing if storeId doesn't exist.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Invalid storeId value.

    GetStore(Int32)

    Gets the storeId record.

    Declaration
    public Task<Store> GetStore(int storeId)
    Parameters
    Type Name Description
    System.Int32 storeId

    The store's DB recordnumber.

    Returns
    Type Description
    System.Threading.Tasks.Task<Store>

    The store details for specified storeId.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Invalid storeId value.

    System.InvalidOperationException

    No store found for storeId.

    See Also
    GetStores()

    GetStoreByType(StoreType)

    Gets the store used for specified storeType.

    Declaration
    public Task<Store> GetStoreByType(StoreType storeType)
    Parameters
    Type Name Description
    StoreType storeType

    The type to get.

    Returns
    Type Description
    System.Threading.Tasks.Task<Store>

    The store details for specified storeType.

    Exceptions
    Type Condition
    System.ArgumentException

    If storeType is Custom because there could be any number of custom stores, where as there is only one store for each of the other types.

    System.InvalidOperationException

    If no store is configured with specified storeType.

    See Also
    GetStore(Int32)
    GetStores()

    GetStores()

    Gets all store details set up.

    Declaration
    public Task<Store[]> GetStores()
    Returns
    Type Description
    System.Threading.Tasks.Task<Store[]>

    Array of Stores.

    See Also
    GetStore(Int32)

    UpdateStore(Store)

    Modify an existing store record.

    Declaration
    public Task<Store> UpdateStore(Store store)
    Parameters
    Type Name Description
    Store store

    Store to modify. Type cannot be changed.

    Returns
    Type Description
    System.Threading.Tasks.Task<Store>

    store.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Null value supplied.

    System.ArgumentOutOfRangeException

    Invalid Id.

    System.ArgumentException

    Store has no name.

    System.InvalidOperationException

    No default store is set or store is the new default store, but doesn't AllowOrdering.

    See Also
    CreateStore(Store)

    Implements

    IStoreService
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX