@@ -276,7 +276,7 @@ public void LogError(string className, string message, [CallerMemberName] string
276
276
public void LogException ( string className , string message , Exception e , [ CallerMemberName ] string methodName = "" ) =>
277
277
Log . Exception ( className , message , e , methodName ) ;
278
278
279
- private readonly ConcurrentDictionary < Type , object > _pluginJsonStorages = new ( ) ;
279
+ private readonly ConcurrentDictionary < Type , ISavable > _pluginJsonStorages = new ( ) ;
280
280
281
281
public void RemovePluginSettings ( string assemblyName )
282
282
{
@@ -294,9 +294,8 @@ public void RemovePluginSettings(string assemblyName)
294
294
295
295
public void SavePluginSettings ( )
296
296
{
297
- foreach ( var value in _pluginJsonStorages . Values )
297
+ foreach ( var savable in _pluginJsonStorages . Values )
298
298
{
299
- var savable = value as ISavable ;
300
299
savable ? . Save ( ) ;
301
300
}
302
301
}
@@ -496,7 +495,7 @@ public Task ShowProgressBoxAsync(string caption, Func<Action<double>, Task> repo
496
495
public bool SetCurrentTheme ( ThemeData theme ) =>
497
496
Theme . ChangeTheme ( theme . FileNameWithoutExtension ) ;
498
497
499
- private readonly ConcurrentDictionary < ( string , string , Type ) , object > _pluginBinaryStorages = new ( ) ;
498
+ private readonly ConcurrentDictionary < ( string , string , Type ) , ISavable > _pluginBinaryStorages = new ( ) ;
500
499
501
500
public void RemovePluginCaches ( string cacheDirectory )
502
501
{
@@ -513,9 +512,8 @@ public void RemovePluginCaches(string cacheDirectory)
513
512
514
513
public void SavePluginCaches ( )
515
514
{
516
- foreach ( var value in _pluginBinaryStorages . Values )
515
+ foreach ( var savable in _pluginBinaryStorages . Values )
517
516
{
518
- var savable = value as ISavable ;
519
517
savable ? . Save ( ) ;
520
518
}
521
519
}
0 commit comments