Добавьте файлы проекта.
This commit is contained in:
8
SQLVision.Services/Configuration/CacheOptions.cs
Normal file
8
SQLVision.Services/Configuration/CacheOptions.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace SQLVision.Services.Configuration;
|
||||
|
||||
public class CacheOptions
|
||||
{
|
||||
public bool Enabled { get; set; } = true;
|
||||
public int DurationMinutes { get; set; } = 10;
|
||||
public long MaxSizeBytes { get; set; } = 100 * 1024 * 1024; // 100MB
|
||||
}
|
||||
13
SQLVision.Services/Configuration/DatabaseOptions.cs
Normal file
13
SQLVision.Services/Configuration/DatabaseOptions.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace SQLVision.Services.Configuration;
|
||||
|
||||
public class DatabaseOptions
|
||||
{
|
||||
public const string SectionName = "Database";
|
||||
|
||||
public string DefaultConnection { get; set; } = string.Empty;
|
||||
public Dictionary<string, string> ConnectionStrings { get; set; } = new();
|
||||
public int CommandTimeout { get; set; } = 300;
|
||||
public bool EnableStatistics { get; set; } = true;
|
||||
public CacheOptions Cache { get; set; } = new();
|
||||
public RetryOptions Retry { get; set; } = new();
|
||||
}
|
||||
8
SQLVision.Services/Configuration/RetryOptions.cs
Normal file
8
SQLVision.Services/Configuration/RetryOptions.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace SQLVision.Services.Configuration;
|
||||
|
||||
public class RetryOptions
|
||||
{
|
||||
public bool Enabled { get; set; } = true;
|
||||
public int MaxRetries { get; set; } = 3;
|
||||
public int DelayMilliseconds { get; set; } = 1000;
|
||||
}
|
||||
Reference in New Issue
Block a user