private void ProcessPortfolioMessage(PortfolioMessage pfMsg)
		{
			if (pfMsg.IsSubscribe)
				_wrapper.SubscribePortfolio(pfMsg.PortfolioName);
			else
				_wrapper.UnSubscribePortfolio(pfMsg.PortfolioName);
		}
Пример #2
0
        /// <summary>
        /// Скопировать данные сообщения в <paramref name="destination"/>.
        /// </summary>
        /// <param name="destination">Объект, в который копируется информация.</param>
        protected PortfolioMessage CopyTo(PortfolioMessage destination)
        {
            destination.PortfolioName         = PortfolioName;
            destination.Currency              = Currency;
            destination.BoardCode             = BoardCode;
            destination.OriginalTransactionId = OriginalTransactionId;
            destination.IsSubscribe           = IsSubscribe;
            destination.State         = State;
            destination.TransactionId = TransactionId;

            this.CopyExtensionInfo(destination);

            return(destination);
        }
Пример #3
0
        /// <summary>
        /// Copy the message into the <paramref name="destination" />.
        /// </summary>
        /// <param name="destination">The object, to which copied information.</param>
        /// <returns>The object, to which copied information.</returns>
        protected PortfolioMessage CopyTo(PortfolioMessage destination)
        {
            base.CopyTo(destination);

            destination.PortfolioName = PortfolioName;
            destination.Currency      = Currency;
            destination.BoardCode     = BoardCode;
            destination.IsSubscribe   = IsSubscribe;
            //destination.State = State;
            destination.TransactionId = TransactionId;
            destination.ClientCode    = ClientCode;
            destination.InternalId    = InternalId;

            return(destination);
        }
Пример #4
0
        /// <summary>
        /// Создать копию объекта <see cref="PortfolioMessage"/>.
        /// </summary>
        /// <returns>Копия.</returns>
        public override Message Clone()
        {
            var clone = new PortfolioMessage
            {
                PortfolioName         = PortfolioName,
                Currency              = Currency,
                BoardCode             = BoardCode,
                OriginalTransactionId = OriginalTransactionId,
                IsSubscribe           = IsSubscribe,
                State         = State,
                TransactionId = TransactionId,
            };

            this.CopyExtensionInfo(clone);

            return(clone);
        }
Пример #5
0
        /// <summary>
        /// Copy the message into the <paramref name="destination" />.
        /// </summary>
        /// <param name="destination">The object, to which copied information.</param>
        /// <returns>The object, to which copied information.</returns>
        public PortfolioMessage CopyTo(PortfolioMessage destination)
        {
            base.CopyTo(destination);

            destination.PortfolioName = PortfolioName;
            destination.Currency      = Currency;
            destination.BoardCode     = BoardCode;
            destination.IsSubscribe   = IsSubscribe;
            //destination.State = State;
            destination.TransactionId = TransactionId;
            destination.ClientCode    = ClientCode;
            destination.InternalId    = InternalId;
            destination.From          = From;
            destination.To            = To;
            destination.Error         = Error;

            return(destination);
        }
		private void ProcessPortfolioMessage(PortfolioMessage message)
		{
			var accountId = GetAccountId(message.PortfolioName);

			if (message.IsSubscribe)
				_streamigClient.SubscribeEventsStreaming(accountId);
			else
				_streamigClient.UnSubscribeEventsStreaming(accountId);
		}
		private void ProcessPortfolioMessage(PortfolioMessage pfMsg)
		{
			var account = _accounts[pfMsg.PortfolioName];

			if (pfMsg.IsSubscribe)
			{
				_client.Session.replayPnl(account, pfMsg.TransactionId);
				_client.Session.replayOpenOrders(account, pfMsg.TransactionId);
				_client.Session.replayExecutions(account, 0, 0, pfMsg.TransactionId);

				_client.Session.subscribeOrder(account);
				_client.Session.subscribePnl(account);
			}
			else
			{
				_client.Session.unsubscribeOrder(account);
				_client.Session.unsubscribePnl(account);
			}
		}
Пример #8
0
		/// <summary>
		/// Скопировать данные сообщения в <paramref name="destination"/>.
		/// </summary>
		/// <param name="destination">Объект, в который копируется информация.</param>
		protected PortfolioMessage CopyTo(PortfolioMessage destination)
		{
			destination.PortfolioName = PortfolioName;
			destination.Currency = Currency;
			destination.BoardCode = BoardCode;
			destination.OriginalTransactionId = OriginalTransactionId;
			destination.IsSubscribe = IsSubscribe;
			destination.State = State;
			destination.TransactionId = TransactionId;

			this.CopyExtensionInfo(destination);

			return destination;
		}