Ejemplo n.º 1
0
 internal static void InitializeQuotePolicyDetails(DataSet ds, Dictionary <QuotePolicyInstrumentIdPair, QuotePolicyDetail> dict)
 {
     Initialize(ds, "QuotePolicyDetail", dr =>
     {
         QuotePolicyDetail quotePolicyDetail = new QuotePolicyDetail(new DBRow(dr));
         dict.Add(new QuotePolicyInstrumentIdPair(quotePolicyDetail.QuotePolicyId, quotePolicyDetail.InstrumentId), quotePolicyDetail);
     });
 }
Ejemplo n.º 2
0
        public QuotePolicyDetail GetQuotePolicyDetail(IQuotePolicyProvider quotePolicyProvider, Guid instrumentId, DateTime?tradeDay = null)
        {
            QuotePolicyDetail result = quotePolicyProvider.Get <QuotePolicyDetail>(delegate(Guid id, out QuotePolicyDetail qpd)
            {
                return(_settingInfo.QuotePolicyDetails.TryGetValue(new QuotePolicyInstrumentIdPair(id, instrumentId), out qpd));
            });

            return(this.GetData(quotePolicyProvider, tradeDay, null, (setting, key) => setting.GetQuotePolicyDetail(key, instrumentId), result));
        }