Table of Contents

Class ProviderConfiguration

Namespace
OpenSettings.Configurations
Assembly
OpenSettings.dll

Represents the configuration for the provider service, including data access settings, compression options, and the selection of specific data access strategies.

public class ProviderConfiguration
Inheritance
ProviderConfiguration
Inherited Members

Constructors

ProviderConfiguration()

Initializes a new instance of the ProviderConfiguration class with the default Orm selection.

public ProviderConfiguration()

ProviderConfiguration(DataAccessType)

Initializes a new instance of the ProviderConfiguration class with a specific data access type.

public ProviderConfiguration(DataAccessType selection)

Parameters

selection DataAccessType

The DataAccessType that determines which data access method (e.g., Orm) is selected.

Properties

CompressionLevel

Gets or sets the compression level used by the provider when storing setting data. Default level is Fastest

public CompressionLevel CompressionLevel { get; set; }

Property Value

CompressionLevel

A CompressionLevel value indicating the compression level.

CompressionType

Gets or sets the compression type used by the provider when storing setting data. Default type is Ogu.Compressions.Abstractions.CompressionType.None.

public CompressionType CompressionType { get; set; }

Property Value

CompressionType

A CompressionType value indicating the type of compression used.

IsOrmSelected

Gets a value indicating whether the Orm data access type is selected. This property is automatically updated based on the Selection.

[JsonIgnore]
public bool IsOrmSelected { get; }

Property Value

bool

A bool indicating whether ORM is selected (true) or not (false).

Remarks

This property is ignored in Json serialization.

LicenseKey

Gets or sets the license key. This property is ignored in Json serialization. If provided, it is used as the primary source for validation. If invalid or missing, the system will check for a license key in the project directory. If still not found or invalid, it will retrieve the license key from the database.

[JsonIgnore]
public string LicenseKey { get; set; }

Property Value

string

Orm

Gets or sets the configuration settings for the Orm (Object-Relational Mapper). This property is used when the Selection is set to Orm.

public OrmConfiguration Orm { get; set; }

Property Value

OrmConfiguration

An OrmConfiguration object containing settings related to the Orm configuration.

Redis

Gets or sets the configuration settings for Redis.

public RedisConfiguration Redis { get; set; }

Property Value

RedisConfiguration

A RedisConfiguration object containing Redis-related configuration.

Selection

Gets or sets the current data access method selected for the provider. The selection determines the type of data persistence used.

public DataAccessType Selection { get; set; }

Property Value

DataAccessType

A DataAccessType value indicating the current data access strategy (e.g., Orm).