forked from ben-haim/BitMexExcel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataCache.cs
More file actions
19 lines (17 loc) · 815 Bytes
/
DataCache.cs
File metadata and controls
19 lines (17 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BitMex
{
internal class DataCache
{
//use thread-safe dictionaries as this will be accessed by both the websocket thread and the excel thread
public ConcurrentDictionary<string, MarketDataSnapshot> MarketData { get { return _marketData; } }
public ConcurrentDictionary<string, BitMexInstrument> Instruments { get { return _instruments; } }
private ConcurrentDictionary<string, MarketDataSnapshot> _marketData = new ConcurrentDictionary<string, MarketDataSnapshot>();
private ConcurrentDictionary<string, BitMexInstrument> _instruments = new ConcurrentDictionary<string, BitMexInstrument>();
}
}