private ConcurrentDictionary <string, QuoteRecord> pendingCancels; // 撤单拒绝时使用

        public QuoteMap(Framework framework, SingleProvider provider, OrderMap orderMap) : base(framework, provider)
        {
            this.orderMap = orderMap;

            pendingOrders  = new ConcurrentDictionary <string, QuoteRecord>();
            workingOrders  = new Dictionary <string, QuoteRecord>();
            orderIDs       = new Dictionary <int, string>();
            pendingCancels = new ConcurrentDictionary <string, QuoteRecord>();
        }
        public void Init(byte id, string name)
        {
            base.id          = id;
            base.name        = name;
            base.description = "QuantBox API Provider";
            base.url         = "www.quantbox.cn";

            // 使用TPL DataFlow来进行行情的保存
            //Input = new ActionBlock<DepthMarketDataField>((x) => OnInputMarketData(x));


            // 只是简单设置,等登录时将把账号设置上,X日志由于一些信息没法
            xlog    = LogManager.GetLogger(Name + ".X");
            barLog  = LogManager.GetLogger("Bar");
            tickLog = LogManager.GetLogger("Tick");

            // 以下初始化的值在,初始化后由软件读取文件中的参数据后又设置回来
            LastPricePlusNTicks = 10;
            EmitBidAsk          = true;
            //UpdateInstrument = true;
            EnableEmitHistoricalData = true;
            FilterDateTime           = true;
            EnableEmitData           = true;
            HasPriceLimit            = true;

            // 这两个地方的路径如果为空,设置一个默认的
            if (string.IsNullOrEmpty(ConfigPath))
            {
                ConfigPath = Path.Combine(Installation.ConfigDir.FullName, Name);
            }
            Directory.CreateDirectory(ConfigPath);

            marketDataRecords = new Dictionary <string, MarketDataRecord>();

            orderMap = new OrderMap(framework, this);
            quoteMap = new QuoteMap(framework, this, orderMap);

            positions = new Dictionary <string, PositionFieldEx>();

            historicalDataRecords = new Dictionary <int, HistoricalDataRecord>();
            historicalDataIds     = new Dictionary <string, int>();

            // ConfigPath在做Setting时已经做了
            Load();
        }