| | | 1 | | namespace LOCKnet.Data; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Beschreibt die aktuell erkannte Storage-Konfiguration fuer eine Vault-Datei. |
| | | 5 | | /// </summary> |
| | | 6 | | public sealed class VaultStorageDescriptor |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Initialisiert eine neue Instanz von <see cref="VaultStorageDescriptor"/>. |
| | | 10 | | /// </summary> |
| | | 11 | | /// <param name="mode">Der erkannte Storage-Modus.</param> |
| | | 12 | | /// <param name="connectionString">Der aktuell verwendbare SQLite-Connection-String.</param> |
| | | 13 | | /// <param name="databasePath">Der aufgeloeste Dateipfad oder <see langword="null"/> bei nicht-dateibasierten Verbindu |
| | | 14 | | /// <param name="requiresKeyAtOpen">Gibt an, ob die Datenbank spaeter bereits zum Oeffnen einen Schluessel benoetigt.< |
| | 295 | 15 | | public VaultStorageDescriptor(VaultStorageMode mode, string connectionString, string? databasePath, bool requiresKeyAt |
| | 295 | 16 | | { |
| | 295 | 17 | | ArgumentException.ThrowIfNullOrWhiteSpace(connectionString); |
| | | 18 | | |
| | 295 | 19 | | Mode = mode; |
| | 295 | 20 | | ConnectionString = connectionString; |
| | 295 | 21 | | DatabasePath = databasePath; |
| | 295 | 22 | | RequiresKeyAtOpen = requiresKeyAtOpen; |
| | 295 | 23 | | } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Der erkannte Storage-Modus. |
| | | 27 | | /// </summary> |
| | 303 | 28 | | public VaultStorageMode Mode { get; } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Der aktuell verwendete SQLite-Connection-String. |
| | | 32 | | /// </summary> |
| | 1161 | 33 | | public string ConnectionString { get; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Der aufgeloeste Dateipfad oder <see langword="null"/> bei nicht-dateibasierten Verbindungen. |
| | | 37 | | /// </summary> |
| | 505 | 38 | | public string? DatabasePath { get; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Gibt an, ob diese Storage-Variante bereits beim Oeffnen einen Schluessel benoetigt. |
| | | 42 | | /// </summary> |
| | 43 | 43 | | public bool RequiresKeyAtOpen { get; } |
| | | 44 | | } |