EnvironmentConfigStore
- Namespace:
PPDS.Auth.Profiles - Assembly:
PPDS.Auth - Kind: Class
- Implements:
IDisposable
Summary
Manages persistent storage of environment configurations.
Members
Constructors
EnvironmentConfigStore()
EnvironmentConfigStore()
Creates a store using the default environments file path.
EnvironmentConfigStore(string filePath)
EnvironmentConfigStore(string filePath)
Creates a store using a custom file path.
Methods
ClearCache
void ClearCache()
Clears the in-memory cache, forcing a reload from disk on next access.
Dispose
void Dispose()
(inherited from System.IDisposable.Dispose)
GetConfigAsync
Task<EnvironmentConfig> GetConfigAsync(string url, CancellationToken ct)
Gets the config for a specific environment URL, or null if not configured.
LoadAsync
Task<EnvironmentConfigCollection> LoadAsync(CancellationToken ct)
Loads the environment config collection, using cache if available.
RemoveConfigAsync
Task<bool> RemoveConfigAsync(string url, CancellationToken ct)
Removes config for a specific environment URL.
SaveAsync
Task SaveAsync(EnvironmentConfigCollection collection, CancellationToken ct)
Persists the environment config collection to disk.
SaveConfigAsync
Task<EnvironmentConfig> SaveConfigAsync(string url, string label, Nullable<EnvironmentType> type, Nullable<EnvironmentColor> color, bool clearColor, string discoveredType, string profileName, CancellationToken ct)
Saves or updates config for a specific environment. Merges non-null fields. Optionally links the environment to a profile name.
Properties
FilePath
string FilePath { get; }
Gets the file path used for persistent storage.