Exemplo n.º 1
0
        public override void CopyFrom(BinaryMetaInfo src)
        {
            base.CopyFrom(src);

            var posInfo = (PositionMetaInfo)src;

            BeginValue         = Clone(posInfo.BeginValue);
            CurrentValue       = Clone(posInfo.CurrentValue);
            BlockedValue       = Clone(posInfo.BlockedValue);
            CurrentPrice       = Clone(posInfo.CurrentPrice);
            AveragePrice       = Clone(posInfo.AveragePrice);
            UnrealizedPnL      = Clone(posInfo.UnrealizedPnL);
            RealizedPnL        = Clone(posInfo.RealizedPnL);
            VariationMargin    = Clone(posInfo.VariationMargin);
            Leverage           = Clone(posInfo.Leverage);
            Commission         = Clone(posInfo.Commission);
            CurrentValueInLots = Clone(posInfo.CurrentValueInLots);

            Portfolios.Clear();
            Portfolios.AddRange(posInfo.Portfolios);

            ClientCodes.Clear();
            ClientCodes.AddRange(posInfo.ClientCodes);

            DepoNames.Clear();
            DepoNames.AddRange(posInfo.DepoNames);

            SettlementPrice = Clone(posInfo.SettlementPrice);
        }
Exemplo n.º 2
0
        public override void CopyFrom(PositionMetaInfo src)
        {
            base.CopyFrom(src);

            BeginValue         = Clone(src.BeginValue);
            CurrentValue       = Clone(src.CurrentValue);
            BlockedValue       = Clone(src.BlockedValue);
            CurrentPrice       = Clone(src.CurrentPrice);
            AveragePrice       = Clone(src.AveragePrice);
            UnrealizedPnL      = Clone(src.UnrealizedPnL);
            RealizedPnL        = Clone(src.RealizedPnL);
            VariationMargin    = Clone(src.VariationMargin);
            Leverage           = Clone(src.Leverage);
            Commission         = Clone(src.Commission);
            CurrentValueInLots = Clone(src.CurrentValueInLots);

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

            ClientCodes.Clear();
            ClientCodes.AddRange(src.ClientCodes);

            DepoNames.Clear();
            DepoNames.AddRange(src.DepoNames);
        }
        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);
        }
        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;
            FirstPnL        = src.FirstPnL;
            LastPnL         = src.LastPnL;
            FirstPosition   = src.FirstPosition;
            LastPosition    = src.LastPosition;
            FirstSlippage   = src.FirstSlippage;
            LastSlippage    = src.LastSlippage;

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

            ClientCodes.Clear();
            ClientCodes.AddRange(src.ClientCodes);

            BrokerCodes.Clear();
            BrokerCodes.AddRange(src.BrokerCodes);

            DepoNames.Clear();
            DepoNames.AddRange(src.DepoNames);

            UserOrderIds.Clear();
            UserOrderIds.AddRange(src.UserOrderIds);

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

            SystemComments.Clear();
            SystemComments.AddRange(src.SystemComments);

            Errors.Clear();
            Errors.AddRange(src.Errors);
        }