private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataMessage origin, MarketDataMessage reply) { var error = reply.Error ?? new NotSupportedException(LocalizedStrings.SubscriptionNotSupported.Put(origin)); if (reply.IsNotSupported) { this.AddWarningLog(LocalizedStrings.SubscriptionNotSupported, origin); } else { this.AddErrorLog(LocalizedStrings.SubscribedError, security?.Id, origin.DataType, error.Message); } MarketDataSubscriptionFailed?.Invoke(security, origin, error); MarketDataSubscriptionFailed2?.Invoke(security, origin, reply); }
private void RaiseMarketDataSubscriptionFailed(MarketDataMessage origin, SubscriptionResponseMessage reply, Subscription subscription) { if (origin == null) { throw new ArgumentNullException(nameof(origin)); } if (reply == null) { throw new ArgumentNullException(nameof(reply)); } if (subscription == null) { throw new ArgumentNullException(nameof(subscription)); } var securityId = subscription.SecurityId; var error = reply.Error ?? new NotSupportedException(LocalizedStrings.SubscriptionNotSupported.Put(origin)); if (reply.IsNotSupported()) { this.AddWarningLog(LocalizedStrings.SubscriptionNotSupported, origin); } else { this.AddErrorLog(LocalizedStrings.SubscribedError, securityId, origin.DataType2, error.Message); } var security = TryGetSecurity(securityId); MarketDataSubscriptionFailed?.Invoke(security, origin, error); MarketDataSubscriptionFailed2?.Invoke(security, origin, reply); RaiseSubscriptionFailed(subscription, error, true); if (subscription.CandleSeries != null) { RaiseCandleSeriesError(subscription.CandleSeries, reply); } }
private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataMessage message, Exception error) { this.AddErrorLog(LocalizedStrings.SubscribedError, security?.Id, message.DataType, message.Error); MarketDataSubscriptionFailed?.Invoke(security, message, error); }
private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataTypes dataType, Exception error) { this.AddErrorLog(LocalizedStrings.Str634Params, security.Id, dataType, error); MarketDataSubscriptionFailed?.Invoke(security, dataType, error); }
private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataMessage message) { this.AddErrorLog(LocalizedStrings.Str634Params, security.Id, message.DataType, message.Error); MarketDataSubscriptionFailed?.Invoke(security, message); }