Class MerchantStorageFoundationService
- Assembly
- arolariu.Backend.Domain.Invoices.dll
Class that implements the merchant storage foundation service.
public class MerchantStorageFoundationService : IMerchantStorageFoundationService
- Inheritance
-
MerchantStorageFoundationService
- Implements
- Inherited Members
Constructors
MerchantStorageFoundationService(IInvoiceNoSqlBroker, ILoggerFactory)
Public constructor.
public MerchantStorageFoundationService(IInvoiceNoSqlBroker invoiceNoSqlBroker, ILoggerFactory loggerFactory)
Parameters
invoiceNoSqlBroker
IInvoiceNoSqlBrokerloggerFactory
ILoggerFactory
Fields
invoiceNoSqlBroker
private readonly IInvoiceNoSqlBroker invoiceNoSqlBroker
Field Value
logger
private readonly ILogger<IMerchantStorageFoundationService> logger
Field Value
Methods
CreateAndLogDependencyException(Exception)
private MerchantFoundationServiceDependencyException CreateAndLogDependencyException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogDependencyValidationException(Exception)
private MerchantFoundationServiceDependencyValidationException CreateAndLogDependencyValidationException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogServiceException(Exception)
private MerchantFoundationServiceException CreateAndLogServiceException(Exception exception)
Parameters
exception
Exception
Returns
CreateAndLogValidationException(Exception)
private MerchantFoundationServiceValidationException CreateAndLogValidationException(Exception exception)
Parameters
exception
Exception
Returns
CreateMerchantObject(Merchant)
Creates a merchant object.
public Task<Merchant> CreateMerchantObject(Merchant merchant)
Parameters
merchant
Merchant
Returns
DeleteMerchantObject(Guid)
Deletes a merchant object.
public Task DeleteMerchantObject(Guid identifier)
Parameters
identifier
Guid
Returns
DeleteMerchantObject(Guid, Guid)
Deletes a merchant object.
public Task DeleteMerchantObject(Guid identifier, Guid parentCompanyId)
Parameters
Returns
ReadAllMerchantObjects()
Reads all merchant objects.
public Task<IEnumerable<Merchant>> ReadAllMerchantObjects()
Returns
ReadAllMerchantObjects(Guid)
Reads all merchant objects.
public Task<IEnumerable<Merchant>> ReadAllMerchantObjects(Guid parentCompanyId)
Parameters
parentCompanyId
Guid
Returns
ReadMerchantObject(Guid)
Reads a merchant object.
public Task<Merchant> ReadMerchantObject(Guid identifier)
Parameters
identifier
Guid
Returns
ReadMerchantObject(Guid, Guid)
Reads a merchant object.
public Task<Merchant> ReadMerchantObject(Guid identifier, Guid parentCompanyId)
Parameters
Returns
TryCatchAsync(CallbackFunctionForMerchant)
private Task<Merchant> TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionForMerchant callbackFunction)
Parameters
callbackFunction
MerchantStorageFoundationService.CallbackFunctionForMerchant
Returns
TryCatchAsync(CallbackFunctionForMerchantList)
private Task<IEnumerable<Merchant>> TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionForMerchantList callbackFunction)
Parameters
callbackFunction
MerchantStorageFoundationService.CallbackFunctionForMerchantList
Returns
TryCatchAsync(CallbackFunctionWithNoReturn)
private Task TryCatchAsync(MerchantStorageFoundationService.CallbackFunctionWithNoReturn callbackFunction)
Parameters
callbackFunction
MerchantStorageFoundationService.CallbackFunctionWithNoReturn
Returns
UpdateMerchantObject(Guid, Merchant)
Updates a merchant object.
public Task<Merchant> UpdateMerchantObject(Guid merchantIdentifier, Merchant updatedMerchant)
Parameters
Returns
UpdateMerchantObject(Merchant, Merchant)
Updates a merchant object.
public Task<Merchant> UpdateMerchantObject(Merchant currentMerchant, Merchant updatedMerchant)
Parameters
Returns
ValidateMerchantIdentifierIsSet(Guid?)
private static void ValidateMerchantIdentifierIsSet(Guid? identifier)
Parameters
identifier
Guid?
ValidateParentCompanyIdentifierIsSet(Guid?)
private static void ValidateParentCompanyIdentifierIsSet(Guid? parentCompanyId)
Parameters
parentCompanyId
Guid?