@@ -14,9 +14,8 @@ 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 readonly ConcurrentDictionary < string , string > _guidToKey = new ConcurrentDictionary < string , string > ( ) ;
17
+ private static BinaryStorage < ConcurrentDictionary < string , int > > _storage ;
18
18
private static readonly ConcurrentDictionary < string , string > GuidToKey = new ConcurrentDictionary < string , string > ( ) ;
19
- private static BinaryStorage < Dictionary < string , int > > _storage ;
20
19
private static IImageHashGenerator _hashGenerator ;
21
20
private static bool EnableImageHash = true ;
22
21
@@ -33,7 +32,7 @@ public static class ImageLoader
33
32
34
33
public static void Initialize ( )
35
34
{
36
- _storage = new BinaryStorage < Dictionary < string , int > > ( "Image" ) ;
35
+ _storage = new BinaryStorage < ConcurrentDictionary < string , int > > ( "Image" ) ;
37
36
_hashGenerator = new ImageHashGenerator ( ) ;
38
37
39
38
ImageCache . Usage = LoadStorageToConcurrentDictionary ( ) ;
@@ -70,7 +69,7 @@ private static ConcurrentDictionary<string, int> LoadStorageToConcurrentDictiona
70
69
{
71
70
lock ( _storage )
72
71
{
73
- var loaded = _storage . TryLoad ( new Dictionary < string , int > ( ) ) ;
72
+ var loaded = _storage . TryLoad ( new ConcurrentDictionary < string , int > ( ) ) ;
74
73
75
74
return new ConcurrentDictionary < string , int > ( loaded ) ;
76
75
}
0 commit comments