Table of Contents

Class ConfigurationProviderBase

Namespace
RetailForce.Fiscalisation.Configuration
Assembly
RetailForce.Fiscalisation.Model.dll

Abstract configuration provider to load the configuration for the fiscal system.

public abstract class ConfigurationProviderBase
Inheritance
ConfigurationProviderBase
Derived
Inherited Members

Fields

EncryptionSalt

public const string EncryptionSalt = "RetailForce_2021!"

Field Value

string

Methods

ClientExists(CompanyIdentification, string, string)

Returns whether the given client exists in the client dictionary.

public abstract bool ClientExists(CompanyIdentification companyIdentification, string storeNumber, string terminalNumber)

Parameters

companyIdentification CompanyIdentification
storeNumber string
terminalNumber string

Returns

bool

True if the given client exists; otherwise false.

Exceptions

ArgumentNullException

Thrown if the parameter companyIdentification is set to null.

ArgumentNullException

Thrown if the parameter storeNumber is set to null or string.Empty.

ArgumentNullException

Thrown if the parameter terminalNumber is set to null or string.Empty.

ClientExists(Guid)

Returns whether the given client exists in the client dictionary.

public abstract bool ClientExists(Guid clientId)

Parameters

clientId Guid

The client id to search.

Returns

bool

True if the given client exists; otherwise false.

Exceptions

ArgumentNullException

Thrown if parameter clientId is set to Empty.

ClientExists(Guid, string, string)

Returns whether the given client exists in the client dictionary.

public abstract bool ClientExists(Guid licenseConsumerId, string storeNumber, string terminalNumber)

Parameters

licenseConsumerId Guid
storeNumber string
terminalNumber string

Returns

bool

True if the given client exists; otherwise false.

Exceptions

ArgumentNullException

Thrown if the parameter licenseConsumerId is set to Empty.

ArgumentNullException

Thrown if the parameter storeNumber is set to null or string.Empty.

ArgumentNullException

Thrown if the parameter terminalNumber is set to null or string.Empty.

CreateClient(FiscalClient)

Creates a new client and stores it to the store.

public abstract void CreateClient(FiscalClient client)

Parameters

client FiscalClient

The new client.

DecryptString(Guid, string)

Decrypts a string of the fiscal client configuration.

public static string DecryptString(Guid uniqueClientId, string stringToDecrypt)

Parameters

uniqueClientId Guid

The unique client id of the fiscal client of the configuration.

stringToDecrypt string

The string to decrypt.

Returns

string

The decrypted string.

DeleteClient(Guid)

This method deletes the client from the configuration (and stores the configuration).

public abstract void DeleteClient(Guid clientId)

Parameters

clientId Guid

The id of the client to delete.

Exceptions

ArgumentNullException

Thrown if parameter clientId is set to Empty.

KeyNotFoundException

Thrown if given client was not found in the configuration.

EncryptString(Guid, string)

Encrypts a string of the fiscal client configuration.

public static string EncryptString(Guid uniqueClientId, string stringToEncrypt)

Parameters

uniqueClientId Guid

The unique client id of the fiscal client of the configuration.

stringToEncrypt string

The string to encrypt.

Returns

string

The encrypted string.

GetClientConfiguration(Guid)

Returns the client configuration for the requested id.

public abstract FiscalClient GetClientConfiguration(Guid clientId)

Parameters

clientId Guid

The id (Guid) of the requested client configuration.

Returns

FiscalClient

The client configuration for the requested id.

Exceptions

ArgumentOutOfRangeException

Thrown if the client with the given parameter clientId does not exist.

GetClients()

Gets a list of all available clients stored at the system.

public abstract Guid[] GetClients()

Returns

Guid[]

A list of all available unique client id's.

GetFiscalClients()

Gets a list of all available clients stored at the system.

public abstract FiscalClient[] GetFiscalClients()

Returns

FiscalClient[]

A list of all available unique client id's.

TryGetClientConfiguration(Guid, out FiscalClient)

Tries to return the client configuration (return value = true); otherwise false.

public abstract bool TryGetClientConfiguration(Guid clientId, out FiscalClient fiscalClient)

Parameters

clientId Guid

The id (Guid) of the requested client configuration.

fiscalClient FiscalClient

The client configuration for the requested id (if found).

Returns

bool

True if the client configuration was found; otherwise false.

UpdateClient(FiscalClient)

Updates a client and stores the configuration.

public abstract void UpdateClient(FiscalClient client)

Parameters

client FiscalClient

The client to update.

Exceptions

ArgumentNullException

Thrown if parameter client is set to null.

KeyNotFoundException

Thrown if client is not found in the store to update.