Exemplo n.º 1
0
 public void Push(Quotation4Bit quotation)
 {
     lock (this._Lock)
     {
         this._Pool.Push(quotation);
     }
 }
Exemplo n.º 2
0
 public static Quotation4Bit TryAddQuotation(OverridedQuotation[] overridedQuotations, TraderState state, long sequence)
 {
     Quotation4Bit quotation;
     long filterSign = state.SignMapping;
     if (_Dict.TryGetValue(filterSign, out quotation))
     {
         return quotation;
     }
     quotation = Quotation4BitPool.Default.Pop();
     if (quotation == null)
     {
         quotation = new Quotation4Bit(overridedQuotations, state);
     }
     else
     {
        quotation.Initialize(overridedQuotations, state);
     }
     quotation.Sequence = sequence;
     if (_Dict.TryAdd(filterSign, quotation))
     {
         return quotation;
     }
     return quotation;
 }