Esempio n. 1
0
 public static BinaryObj Checkout(BinaryObj.PresetType type)
 {
     if (type == BinaryObj.PresetType.RequestToMatching)
     {
         return(PoolForReq.Pool.Checkout());
     }
     else if (type == BinaryObj.PresetType.ProcessOrderResult)
     {
         return(PoolForResp.Pool.Checkout());
     }
     else if (type == BinaryObj.PresetType.Transaction)
     {
         return(PoolForTx.Pool.Checkout());
     }
     return(null);
 }
Esempio n. 2
0
 public BinaryObjPool(int byteArrayLength, BinaryObj.PresetType t = BinaryObj.PresetType.Unknown)
 {
     Pool = new objPool <BinaryObj>(() => new BinaryObj(byteArrayLength, t));
 }