private void ProcessPortfolioMessage(PortfolioMessage pfMsg) { if (pfMsg.IsSubscribe) _wrapper.SubscribePortfolio(pfMsg.PortfolioName); else _wrapper.UnSubscribePortfolio(pfMsg.PortfolioName); }
/// <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); }
/// <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); }
/// <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); }
/// <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); } }
/// <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; }