@@ -14,7 +14,7 @@ namespace Flow.Launcher.Infrastructure.Image
14
14
public static class ImageLoader
15
15
{
16
16
private static readonly ImageCache ImageCache = new ImageCache ( ) ;
17
- private static BinaryStorage < ConcurrentDictionary < string , int > > _storage ;
17
+ private static BinaryStorage < Dictionary < string , int > > _storage ;
18
18
private static readonly ConcurrentDictionary < string , string > GuidToKey = new ConcurrentDictionary < string , string > ( ) ;
19
19
private static IImageHashGenerator _hashGenerator ;
20
20
private static bool EnableImageHash = true ;
@@ -32,7 +32,7 @@ public static class ImageLoader
32
32
33
33
public static void Initialize ( )
34
34
{
35
- _storage = new BinaryStorage < ConcurrentDictionary < string , int > > ( "Image" ) ;
35
+ _storage = new BinaryStorage < Dictionary < string , int > > ( "Image" ) ;
36
36
_hashGenerator = new ImageHashGenerator ( ) ;
37
37
38
38
ImageCache . Usage = LoadStorageToConcurrentDictionary ( ) ;
@@ -62,15 +62,15 @@ public static void Save()
62
62
lock ( _storage )
63
63
{
64
64
ImageCache . Cleanup ( ) ;
65
- _storage . Save ( ImageCache . Usage ) ;
65
+ _storage . Save ( new Dictionary < string , int > ( ImageCache . Usage ) ) ;
66
66
}
67
67
}
68
68
69
69
private static ConcurrentDictionary < string , int > LoadStorageToConcurrentDictionary ( )
70
70
{
71
71
lock ( _storage )
72
72
{
73
- var loaded = _storage . TryLoad ( new ConcurrentDictionary < string , int > ( ) ) ;
73
+ var loaded = _storage . TryLoad ( new Dictionary < string , int > ( ) ) ;
74
74
75
75
return new ConcurrentDictionary < string , int > ( loaded ) ;
76
76
}
0 commit comments