Table of Contents

Class FileConfigurationProvider

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

Configuration provider with file access (one file for all clients).

public class FileConfigurationProvider : JsonConfigurationProviderBase
Inheritance
FileConfigurationProvider
Inherited Members

Constructors

FileConfigurationProvider(string, ILogger)

Constructor.

public FileConfigurationProvider(string configurationFile, ILogger logger)

Parameters

configurationFile string

The path to the configuration file. If no configuration file is found a new one is created.

logger ILogger

The logger to log checksum errors.

Exceptions

DirectoryNotFoundException

Thrown if the path of the given configurationFile is not found.

ArgumentNullException

Thrown if parameter configurationFile is set to null or empty string.

ArgumentNullException

Thrown if parameter logger is set to null.

Methods

LoadConfiguration()

Loads the configuration into memory from the appropriate store.

protected override void LoadConfiguration()

StoreConfiguration()

Stores the configuration from memory into the appropriate store.

protected override void StoreConfiguration()

ValidateChecksum()

Validates configuration file with checksum file.

public bool ValidateChecksum()

Returns

bool

True if validation was successful and file was not changed; otherwise false.