Finished backup service draft

This commit is contained in:
2026-01-17 17:41:39 +01:00
commit 881ec1c0ec
17 changed files with 431 additions and 0 deletions

27
ConfigData.cs Normal file
View File

@@ -0,0 +1,27 @@
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"]!;
}
}