diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-11 14:13:17 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-11 14:13:17 -0500 |
| commit | a363f956c9e8e923c647877832f3c3bb9f5c4351 (patch) | |
| tree | 3a6730a46cefb8de847a9a154f817c053cb7793b /src/slskd/Application/SharedFileCache.cs | |
| parent | acd293a58a8efe20f98d8702d4823fae5ef81316 (diff) | |
| download | slskd-a363f956c9e8e923c647877832f3c3bb9f5c4351.tar.gz | |
refactor state management
Diffstat (limited to 'src/slskd/Application/SharedFileCache.cs')
| -rw-r--r-- | src/slskd/Application/SharedFileCache.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slskd/Application/SharedFileCache.cs b/src/slskd/Application/SharedFileCache.cs index 7bd30d2a..e1f3e96d 100644 --- a/src/slskd/Application/SharedFileCache.cs +++ b/src/slskd/Application/SharedFileCache.cs @@ -48,10 +48,11 @@ namespace slskd } /// <summary> - /// Gets the cache state. + /// Gets the cache state monitor. /// </summary> - public IStateMonitor<SharedFileCacheState> State { get; } = new StateMonitor<SharedFileCacheState>(); + public IStateMonitor<SharedFileCacheState> StateMonitor => State; + private IManagedState<SharedFileCacheState> State { get; } = new ManagedState<SharedFileCacheState>(); private ILogger Log { get; } = Serilog.Log.ForContext<SharedFileCache>(); private HashSet<string> MaskedDirectories { get; set; } private Dictionary<string, File> MaskedFiles { get; set; } |
