18 using System.Threading;
21 using System.Collections.Concurrent;
31 private static int _wroteTraceStatement;
32 private readonly ConcurrentDictionary<AuxiliaryDataKey, MapFileResolver> _cache;
40 _cache =
new ConcurrentDictionary<AuxiliaryDataKey, MapFileResolver>();
49 _dataProvider = dataProvider;
60 return _cache.GetOrAdd(auxiliaryDataKey, GetMapFileResolver);
69 if (!Directory.Exists(mapFileDirectory))
72 if (Interlocked.CompareExchange(ref _wroteTraceStatement, 1, 0) == 0)
74 Log.
Error($
"LocalDiskMapFileProvider.GetMapFileResolver({market}): " +
75 $
"The specified directory does not exist: {mapFileDirectory}"
78 return MapFileResolver.Empty;
80 return new MapFileResolver(MapFile.GetMapFiles(mapFileDirectory, market, securityType, _dataProvider));