@@ -276,7 +276,7 @@ public void LogError(string className, string message, [CallerMemberName] string
276276 public void LogException ( string className , string message , Exception e , [ CallerMemberName ] string methodName = "" ) =>
277277 Log . Exception ( className , message , e , methodName ) ;
278278
279- private readonly ConcurrentDictionary < Type , object > _pluginJsonStorages = new ( ) ;
279+ private readonly ConcurrentDictionary < Type , ISavable > _pluginJsonStorages = new ( ) ;
280280
281281 public void RemovePluginSettings ( string assemblyName )
282282 {
@@ -294,9 +294,8 @@ public void RemovePluginSettings(string assemblyName)
294294
295295 public void SavePluginSettings ( )
296296 {
297- foreach ( var value in _pluginJsonStorages . Values )
297+ foreach ( var savable in _pluginJsonStorages . Values )
298298 {
299- var savable = value as ISavable ;
300299 savable ? . Save ( ) ;
301300 }
302301 }
@@ -496,7 +495,7 @@ public Task ShowProgressBoxAsync(string caption, Func<Action<double>, Task> repo
496495 public bool SetCurrentTheme ( ThemeData theme ) =>
497496 Theme . ChangeTheme ( theme . FileNameWithoutExtension ) ;
498497
499- private readonly ConcurrentDictionary < ( string , string , Type ) , object > _pluginBinaryStorages = new ( ) ;
498+ private readonly ConcurrentDictionary < ( string , string , Type ) , ISavable > _pluginBinaryStorages = new ( ) ;
500499
501500 public void RemovePluginCaches ( string cacheDirectory )
502501 {
@@ -513,9 +512,8 @@ public void RemovePluginCaches(string cacheDirectory)
513512
514513 public void SavePluginCaches ( )
515514 {
516- foreach ( var value in _pluginBinaryStorages . Values )
515+ foreach ( var savable in _pluginBinaryStorages . Values )
517516 {
518- var savable = value as ISavable ;
519517 savable ? . Save ( ) ;
520518 }
521519 }
0 commit comments