Beispiel #1
0
        private void CreateSystemComments()
        {
            AssemblyName executingAssemblyName = Assembly.GetExecutingAssembly().GetName();

            SystemComments.Clear();
            SystemComments.Add(string.Format("This file was generated by {0} v{1} application({3} v{4}).{2}", _appName, _appVersion, Environment.NewLine, executingAssemblyName.Name, executingAssemblyName.Version));
            SystemComments.Add(string.Format("By user '{0}' at {1:G}.{2}", Environment.UserName, DateTime.Now, Environment.NewLine));
        }
        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);
        }