예제 #1
0
        public override void CopyFrom(TransactionSerializerMetaInfo src)
        {
            base.CopyFrom(src);

            FirstOrderId               = src.FirstOrderId;
            LastOrderId                = src.LastOrderId;
            FirstTradeId               = src.FirstTradeId;
            LastTradeId                = src.LastTradeId;
            FirstTransactionId         = src.FirstTransactionId;
            LastTransactionId          = src.LastTransactionId;
            FirstOriginalTransactionId = src.FirstOriginalTransactionId;
            LastOriginalTransactionId  = src.LastOriginalTransactionId;
            FirstPrice      = src.FirstPrice;
            LastPrice       = src.LastPrice;
            FirstCommission = src.FirstCommission;
            LastCommission  = src.LastCommission;

            Portfolios.Clear();
            Portfolios.AddRange(src.Portfolios);

            StrategyIds.Clear();
            StrategyIds.AddRange(src.StrategyIds);

            Comments.Clear();
            Comments.AddRange(src.Comments);

            Errors.Clear();
            Errors.AddRange(src.Errors);
        }
        public override void CopyFrom(BinaryMetaInfo src)
        {
            base.CopyFrom(src);

            var tsInfo = (TransactionSerializerMetaInfo)src;

            FirstOrderId               = tsInfo.FirstOrderId;
            LastOrderId                = tsInfo.LastOrderId;
            FirstTradeId               = tsInfo.FirstTradeId;
            LastTradeId                = tsInfo.LastTradeId;
            FirstTransactionId         = tsInfo.FirstTransactionId;
            LastTransactionId          = tsInfo.LastTransactionId;
            FirstOriginalTransactionId = tsInfo.FirstOriginalTransactionId;
            LastOriginalTransactionId  = tsInfo.LastOriginalTransactionId;
            FirstCommission            = tsInfo.FirstCommission;
            LastCommission             = tsInfo.LastCommission;
            FirstPnL      = tsInfo.FirstPnL;
            LastPnL       = tsInfo.LastPnL;
            FirstPosition = tsInfo.FirstPosition;
            LastPosition  = tsInfo.LastPosition;
            FirstSlippage = tsInfo.FirstSlippage;
            LastSlippage  = tsInfo.LastSlippage;

            Portfolios.Clear();
            Portfolios.AddRange(tsInfo.Portfolios);

            ClientCodes.Clear();
            ClientCodes.AddRange(tsInfo.ClientCodes);

            BrokerCodes.Clear();
            BrokerCodes.AddRange(tsInfo.BrokerCodes);

            DepoNames.Clear();
            DepoNames.AddRange(tsInfo.DepoNames);

            UserOrderIds.Clear();
            UserOrderIds.AddRange(tsInfo.UserOrderIds);

            Comments.Clear();
            Comments.AddRange(tsInfo.Comments);

            SystemComments.Clear();
            SystemComments.AddRange(tsInfo.SystemComments);

            Errors.Clear();
            Errors.AddRange(tsInfo.Errors);

            StrategyIds.Clear();
            StrategyIds.AddRange(tsInfo.StrategyIds);
        }