1
- using System . Collections . Generic ;
1
+ using System . Collections . Concurrent ;
2
+ using System . Collections . Generic ;
2
3
using System . Threading . Tasks ;
3
4
using System . Windows ;
4
5
using System . Windows . Controls ;
@@ -16,10 +17,10 @@ public class JsonRPCPluginSettings
16
17
public Dictionary < string , FrameworkElement > SettingControls { get ; } = new ( ) ;
17
18
18
19
public IReadOnlyDictionary < string , object > Inner => Settings ;
19
- protected Dictionary < string , object > Settings { get ; set ; }
20
+ protected ConcurrentDictionary < string , object > Settings { get ; set ; }
20
21
public required IPublicAPI API { get ; init ; }
21
22
22
- private JsonStorage < Dictionary < string , object > > _storage ;
23
+ private JsonStorage < ConcurrentDictionary < string , object > > _storage ;
23
24
24
25
// maybe move to resource?
25
26
private static readonly Thickness settingControlMargin = new ( 0 , 9 , 18 , 9 ) ;
@@ -33,7 +34,7 @@ public class JsonRPCPluginSettings
33
34
34
35
public async Task InitializeAsync ( )
35
36
{
36
- _storage = new JsonStorage < Dictionary < string , object > > ( SettingPath ) ;
37
+ _storage = new JsonStorage < ConcurrentDictionary < string , object > > ( SettingPath ) ;
37
38
Settings = await _storage . LoadAsync ( ) ;
38
39
39
40
foreach ( var ( type , attributes ) in Configuration . Body )
0 commit comments