コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: Connector_Raise.cs プロジェクト: vskynet/StockSharp
 private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataMessage message, Exception error)
 {
     this.AddErrorLog(LocalizedStrings.SubscribedError, security?.Id, message.DataType, message.Error);
     MarketDataSubscriptionFailed?.Invoke(security, message, error);
 }
コード例 #4
0
 private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataTypes dataType, Exception error)
 {
     this.AddErrorLog(LocalizedStrings.Str634Params, security.Id, dataType, error);
     MarketDataSubscriptionFailed?.Invoke(security, dataType, error);
 }
コード例 #5
0
 private void RaiseMarketDataSubscriptionFailed(Security security, MarketDataMessage message)
 {
     this.AddErrorLog(LocalizedStrings.Str634Params, security.Id, message.DataType, message.Error);
     MarketDataSubscriptionFailed?.Invoke(security, message);
 }