27 lines
855 B
C#
27 lines
855 B
C#
namespace OneDriveBackupService;
|
|
|
|
public sealed class ConfigData {
|
|
public string Schedule { get; }
|
|
public string BackupUploadRoot { get; }
|
|
public string LocalRoot { get; }
|
|
public string IncludeFile { get; }
|
|
public int KeepLast { get; }
|
|
|
|
public string TenantId { get; }
|
|
public string ClientId { get; }
|
|
public string ClientSecret { get; }
|
|
public string UserId { get; }
|
|
|
|
public ConfigData(IConfiguration config) {
|
|
Schedule = config["Schedule"]!;
|
|
BackupUploadRoot = config["UploadRoot"]!;
|
|
LocalRoot = config["LocalRoot"]!;
|
|
IncludeFile = config["IncludeFile"]!;
|
|
KeepLast = int.Parse(config["KeepLast"]!);
|
|
|
|
TenantId = config["TenantId"]!;
|
|
ClientId = config["ClientId"]!;
|
|
ClientSecret = config["ClientSecret"]!;
|
|
UserId = config["UserId"]!;
|
|
}
|
|
} |