public override WebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UnsubscribeResponse response = new UnsubscribeResponse();

            // Nothing need to do with this response here
            return(response);
        }
        public UnsubscribeResponse Unsubscribe([System.Xml.Serialization.XmlElementAttribute("Unsubscribe", Namespace = "http://docs.oasis-open.org/wsn/b-2")] Unsubscribe Unsubscribe1)
        {
            if (Application["consumer"] == null)
            {
                SoapFaultSubCode subCode =
                    new SoapFaultSubCode(new XmlQualifiedName("ResourseUnknown", "http://www.onvif.org/ver10/error"));

                SoapException exception = new SoapException("Invalid Argument",
                                                            new XmlQualifiedName("Sender",
                                                                                 "http://www.w3.org/2003/05/soap-envelope"),
                                                            subCode);
                throw exception;
            }

            Application["consumer"] = null;

            UnsubscribeResponse response = new UnsubscribeResponse();

            if (actionHeader == null)
            {
                actionHeader = new ActionHeader();
            }
            actionHeader.Value = "http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeResponse";


            return(response);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UnsubscribeResponse response = new UnsubscribeResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("UnsubscribeResult", 2))
                    {
                        UnmarshallResult(context, response);
                        continue;
                    }

                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
                    }
                }
            }

            return(response);
        }
Beispiel #4
0
        /// <summary>
        /// 取消订阅
        /// </summary>
        /// <param name="instrument"></param>
        /// <returns></returns>
        public bool Unsubscribe(string instrument)
        {
            try
            {
                if (Instruments.Remove(instrument))
                {
                    var cmd = new UnsubscribeCommand(instrument);

                    var responseText = SendCmd(ODSCommandTags.Unsubscribe, cmd);
                    if (!string.IsNullOrEmpty(responseText))
                    {
                        var response = new UnsubscribeResponse();
                        response.Load(responseText);

                        return(response.Success);
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }

            return(false);
        }
Beispiel #5
0
        public void UnsubscribeTest()
        {
            EndpointReferenceType subscriptionReference = null;
            bool unsubscribed = true;

            RunTest <object>(
                new Backup <object>(
                    () =>
            {
                return(null);
            }),
                () =>
            {
                EnsureNotificationProducerClientCreated();

                SubscribeResponse subscribeResponse = CreateStandardSubscription();
                unsubscribed = false;

                if (subscribeResponse == null)
                {
                    return;
                }

                subscriptionReference = subscribeResponse.SubscriptionReference;

                Unsubscribe request = new Unsubscribe();

                UnsubscribeResponse unsubscribeResponse = Unsubscribe(request);

                unsubscribed = true;

                Renew renew           = new Renew();
                renew.TerminationTime = "PT10S";

                RunStep(
                    () =>
                {
                    _subscriptionManagerClient.Renew(renew);
                    unsubscribed = false;
                },
                    "Renew - negative test",
                    new ValidateTypeFault(ValidateResourseUnknownFault));
            },
                (o) =>
            {
                if (!unsubscribed)
                {
                    if (subscriptionReference != null)
                    {
                        CreateSubscriptionManagerClient(subscriptionReference);
                    }
                    //
                    // Use default timeout of 10 seconds.
                    // Really timeout passed in Subscribe request may be different.
                    //
                    ReleaseSubscriptionManager();
                }
            });
        }
        public async Task Test_unsubscribe()
        {
            UnsubscribeResponse unsubscriberesponse = await deribit.SubscriptionManagement
                                                      .UnsubscribePublic(new UnsubscribeRequest()
            {
                channels = channels,
            });

            Assert.That(unsubscriberesponse.subscribed_channels.Length, Is.EqualTo(channels.Length));
        }
        public new async Task OneTimeTearDown()
        {
            UnsubscribeResponse unsubscriberesponse = await deribit.SubscriptionManagement
                                                      .UnsubscribePrivate(new UnsubscribeRequest()
            {
                channels = channels,
            });

            Assert.That(unsubscriberesponse.subscribed_channels.Length, Is.EqualTo(channels.Length));
        }
        public UnsubscribeResponse Unsubscribe([System.Xml.Serialization.XmlElementAttribute("Unsubscribe", Namespace = "http://docs.oasis-open.org/wsn/b-2")] Unsubscribe Unsubscribe1)
        {
            SoapHeaderProcessing(unknownHeaders);

            ParametersValidation validation = new ParametersValidation();
            UnsubscribeResponse  result     = (UnsubscribeResponse)ExecuteGetCommand(validation, PullPointSubscriptionServiceTest.UnsubscribeTest);

            actionHeader.actionValue = "http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeResponse";

            return(result);
        }
        public async System.Threading.Tasks.Task <UnsubscribeResponse> Unsubcribe(string subscriptionArn)
        {
            UnsubscribeResponse unsubscribeResponse = new UnsubscribeResponse();

            using (AmazonSimpleNotificationServiceClient snsClient = new AmazonSimpleNotificationServiceClient(credentials, Amazon.RegionEndpoint.USEast2))
            {
                UnsubscribeRequest unsubscribeRequest = new UnsubscribeRequest(subscriptionArn);
                unsubscribeResponse = await snsClient.UnsubscribeAsync(unsubscribeRequest);
            }

            return(unsubscribeResponse);
        }
Beispiel #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        /// <remarks>As this method uses SubscriptionManager client, care should be taken that client is created.
        /// It's not posisble to create it here since Subscribe method should be called first to get endpoint address.</remarks>
        protected UnsubscribeResponse Unsubscribe(Unsubscribe request)
        {
            UnsubscribeResponse response = null;

            RunStep(() =>
            {
                response = _subscriptionManagerClient.Unsubscribe(request);
            }, "Send unsubscribe request");


            return(response);
        }
Beispiel #11
0
        public async System.Threading.Tasks.Task UnsubscribeAsync()
        {
            AmazonSimpleNotificationServiceClient snsClient = new AmazonSimpleNotificationServiceClient(RegionEndpoint.APSoutheast1);

            string topicArn = "";

            // Delete an Amazon SNS topic.
            UnsubscribeRequest  unsubscribeRequest  = new UnsubscribeRequest(topicArn);
            UnsubscribeResponse unsubscribeResponse = await snsClient.UnsubscribeAsync(unsubscribeRequest);

            // Print the request ID for the DeleteTopicRequest action.
            Console.WriteLine("UnsubscribeRequest: " + unsubscribeResponse.ResponseMetadata.RequestId);
        }
Beispiel #12
0
        public void ResourceUnknownTest()
        {
            EndpointReferenceType subscriptionReference = null;
            bool unsubscribed    = true;
            int  terminationTime = 10;

            RunTest <object>(
                new Backup <object>(
                    () =>
            {
                return(null);
            }),
                () =>
            {
                EnsureNotificationProducerClientCreated();

                SubscribeResponse subscribeResponse = CreateStandardSubscription(ref terminationTime);
                unsubscribed = false;

                if (subscribeResponse == null)
                {
                    return;
                }

                subscriptionReference = subscribeResponse.SubscriptionReference;

                Unsubscribe request = new Unsubscribe();

                UnsubscribeResponse unsubscribeResponse = Unsubscribe(request);
                unsubscribed = true;

                RunStep(
                    () => { _subscriptionManagerClient.Unsubscribe(request); },
                    "Unsubscribe - negative test",
                    new ValidateTypeFault(ValidateUnsubscribeFault));
            },
                (o) =>
            {
                if (!unsubscribed)
                {
                    if (subscriptionReference != null && _subscriptionManagerClient == null)
                    {
                        CreateSubscriptionManagerClient(subscriptionReference);
                    }
                    ReleaseSubscriptionManager(terminationTime * 1000);
                }
            });
        }
        private bool TryHandleSubscribeResponses(string message)
        {
            if (SubscribeResponse.TryParse(Serializer, message, out var subscribeResponse))
            {
                Streams.SubscribeResponseSubject.OnNext(subscribeResponse);
                return(true);
            }

            if (UnsubscribeResponse.TryParse(Serializer, message, out var unsubscribeResponse))
            {
                Streams.UnsubscribeResponseSubject.OnNext(unsubscribeResponse);
                return(true);
            }

            return(false);
        }
Beispiel #14
0
        /// <summary>
        /// Unsubscribes from the subscription in the SubscriptionManagerClient
        /// </summary>
        public void Unsubscribe()
        {
            if ((SubscriptionManagerClient != null) && ((SubscriptionManagerClient.State == CommunicationState.Opened) | (SubscriptionManagerClient.State == CommunicationState.Created)))
            {
                Unsubscribe         u            = new Unsubscribe();
                UnsubscribeResponse oUnSubResult = SubscriptionManagerClient.Unsubscribe(u);
                SubscriptionManagerClient.Close();
                SubRenewTimer.Stop();

                OnNotification(string.Format("Subscription canceled - Current Time: {0}", System.DateTime.UtcNow));
            }
            else
            {
                OnNotification(string.Format("No subscription to cancel - Current Time: {0}", System.DateTime.UtcNow));
            }
        }
        internal StepType SMSUnsubscribeTest(out UnsubscribeResponse target, out SoapException ex, out int timeOut, Unsubscribe Unsubscribe1)
        {
            StepType res = StepType.None;

            target  = new UnsubscribeResponse();
            timeOut = 0;
            ex      = null;

            //Get step list for command
            XmlNodeList m_testList = m_TestCommon.GetStepsForCommand("SMSUnsubscribe");

            if (m_testList != null)
            {
                //Get current step
                XmlNode test = m_testList[m_commandCount[SMSUnsubscribe]];

                //Generate response
                res = m_TestCommon.GenerateResponseStepTypeVoid(test, out ex, out timeOut);

                //object targetObj;
                //res = m_TestCommon.GenerateResponseStepTypeNotVoid(test, out targetObj, out ex, out timeOut, typeof(Events.UnsubscribeResponse));
                //target = (Events.UnsubscribeResponse)targetObj;

                #region Serialization Temp
                //Events.EndpointReferenceType dsr = new Events.EndpointReferenceType();
                //dsr.Address = new Events.AttributedURIType();
                //dsr.Address.Value = "http://192.168.10.203/onvif/event";
                //dsr.Metadata = new Events.MetadataType();
                //dsr.ReferenceParameters = new Events.ReferenceParametersType();
                //XmlSerializer serializer1 = new XmlSerializer(typeof(Events.EndpointReferenceType));
                //TextWriter textWriter = new StreamWriter("c:\\2.txt");
                //serializer1.Serialize(textWriter, dsr);
                #endregion //Serialization Temp

                m_TestCommon.writeToLog(test, "", true);

                Increment(m_testList.Count, SMSUnsubscribe);
            }
            else
            {
                timeOut = 0;
                target  = null;
                ex      = null;
                res     = StepType.None;
            }
            return(res);
        }
Beispiel #16
0
        public void UnsubscribeTest()
        {
            bool unsubscribed = true;

            RunTest <object>(
                () =>
            {
                return(null);
            },
                () =>
            {
                EnsureEventPortTypeClientCreated();

                EndpointReferenceType endpoint = CreateStandardSubscription();
                if (endpoint == null)
                {
                    return;
                }

                Unsubscribe request = new Unsubscribe();

                UnsubscribeResponse unsubscribeResponse = Unsubscribe(request);
                unsubscribed          = true;
                Renew renew           = new Renew();
                renew.TerminationTime = "PT10S";

                RunStep(
                    () =>
                {
                    _subscriptionManagerClient.Renew(renew);
                    unsubscribed = false;
                },
                    "Renew - negative test",
                    new ValidateTypeFault(ValidateResourseUnknownFault));
            },
                (o) =>
            {
                if (!unsubscribed)
                {
                    BeginStep("Wait until subscription expires");
                    Sleep(10000);
                    StepPassed();
                }
            });
        }
        public UnsubscribeResponse Unsubscribe([System.Xml.Serialization.XmlElementAttribute("Unsubscribe", Namespace = "http://docs.oasis-open.org/wsn/b-2")] Unsubscribe Unsubscribe1)
        {
            int subscriptionKey = SoapReferanceHeaderProcessing(unknownHeaders);

            ConfStorageLoad();
            EventServerLoad();

            EventServer.RemoveSubscribtion(subscriptionKey);

            UnsubscribeResponse res = new UnsubscribeResponse();

            EventServerSave();
            ConfStorageSave();

            actionHeader.actionValue = "http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeResponse";

            return(res);
        }
Beispiel #18
0
        /// <summary>
        /// Unsubscribes from the subscription in the SubscriptionManagerClient
        /// </summary>
        public void Unsubscribe()
        {
            if ((SubscriptionManagerClient != null) && ((SubscriptionManagerClient.State == CommunicationState.Opened) | (SubscriptionManagerClient.State == CommunicationState.Created)))
            {
                Unsubscribe         u            = new Unsubscribe();
                UnsubscribeResponse oUnSubResult = SubscriptionManagerClient.Unsubscribe(u);
                SubscriptionManagerClient.Close();
                SubRenewTimer.Stop();

                listBox1.Items.Add(string.Format("Subscription canceled - Current Time: {0}", DateTime.UtcNow));
                listBox1.SelectedIndex = listBox1.Items.Count - 1;
            }
            else
            {
                listBox1.Items.Add(string.Format("No subscription to cancel - Current Time: {0}", DateTime.UtcNow));
                listBox1.SelectedIndex = listBox1.Items.Count - 1;
            }
        }
Beispiel #19
0
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            UnsubscribeResponse response = new UnsubscribeResponse();

            while (context.Read())
            {
                if (context.IsStartElement)
                {
                    if (context.TestExpression("ResponseMetadata", 2))
                    {
                        response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
            }


            return(response);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, UnsubscribeResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.ReadAtDepth(originalDepth))
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                }
            }

            return;
        }
Beispiel #21
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UnsubscribeResponse response = new UnsubscribeResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Beispiel #22
0
        /// <summary>
        /// 取消订阅
        /// </summary>
        public void Unsubscribe()
        {
            // 设置请求对象
            UnsubscribeRequest request = new UnsubscribeRequest
            {
                SubscriptionUrn = "urn:smn:cn-north-1:cffe4fc4c9a54219b60dbaf7b586e132:SmnApi:30605bffb98c471b884eaec18b9fe6a3",
            };

            try
            {
                // 发送请求并返回响应
                UnsubscribeResponse response = smnClient.SendRequest(request);
                string result = response.RequestId;
                Console.WriteLine("{0}", result);
                Console.ReadLine();
            }
            catch (Exception e)
            {
                // 处理异常
                Console.WriteLine("{0}", e.Message);
            }
        }
Beispiel #23
0
            public void Unsubscribe()
            {
                KeyVaultClient KeyVault;

                try
                {
                    var azureServiceTokenProvider = new AzureServiceTokenProvider();
                    var _token = azureServiceTokenProvider.GetAccessTokenAsync("https://vault.azure.net").Result;
                    KeyVault = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));
                }
                catch (Exception e)
                {
                    throw e;
                }
                var    bundle         = KeyVault.GetSecretAsync("https://pr-kv-uks-dev.vault.azure.net/secrets/AppConnectionKey").Result;
                string appAccessToken = bundle.Value;

                string              email    = "*****@*****.**";
                UnsubscribeRequest  request  = new UnsubscribeRequest(connection, appAccessToken, email);
                UnsubscribeResponse response = request.Send();

                Assert.AreEqual(response.StatusCode, System.Net.HttpStatusCode.OK);
            }
Beispiel #24
0
        public async Task <IActionResult> ManageNotification(string action, string input)
        {
            if (action.Equals("Add"))
            {
                SubscribeResponse response = await SNSClient.SubscribeAsync(new SubscribeRequest("arn:aws:sns:ap-southeast-1:188363912800:eCTF_Notifications", "sms", input));

                if (response.HttpStatusCode == HttpStatusCode.OK)
                {
                    ViewData["Result"] = "Added Sucessfully!";
                    return(View(await SNSClient.ListSubscriptionsByTopicAsync(new ListSubscriptionsByTopicRequest("arn:aws:sns:ap-southeast-1:188363912800:eCTF_Notifications"))));
                }
                else
                {
                    ViewData["Exception"] = "Adding Failed!";
                    return(View(await SNSClient.ListSubscriptionsByTopicAsync(new ListSubscriptionsByTopicRequest("arn:aws:sns:ap-southeast-1:188363912800:eCTF_Notifications"))));
                }
            }
            else if (action.Equals("Remove"))
            {
                UnsubscribeResponse response = await SNSClient.UnsubscribeAsync(new UnsubscribeRequest(input));

                if (response.HttpStatusCode == HttpStatusCode.OK)
                {
                    ViewData["Result"] = "Removed Sucessfully!";
                    return(View(await SNSClient.ListSubscriptionsByTopicAsync(new ListSubscriptionsByTopicRequest("arn:aws:sns:ap-southeast-1:188363912800:eCTF_Notifications"))));
                }
                else
                {
                    ViewData["Exception"] = "Removal Failed!";
                    return(View(await SNSClient.ListSubscriptionsByTopicAsync(new ListSubscriptionsByTopicRequest("arn:aws:sns:ap-southeast-1:188363912800:eCTF_Notifications"))));
                }
            }
            else
            {
                return(NotFound());
            }
        }
Beispiel #25
0
 protected virtual void OnUnsubscribeResponse(UnsubscribeResponse response)
 {
     UnsubscribeResponseReceived?.Invoke(this, new ResponseEventArgs <UnsubscribeResponse>(response));
 }
 protected override void HandleUnsubscribeResponseError(RpcResponseException exception)
 {
     UnsubscribeResponse?.Invoke(this, new StreamingEventArgs <bool>(exception));
 }
Beispiel #27
0
        public IResponse Request(IRequest request, IRecipientCallback callback)
        {
            try
            {
                switch (request)
                {
                case GetBindingDescriptionsRequest getBindingsReq:
                    var getBindingsResp = new GetBindingDescriptionsResponse();
                    foreach (var obj in _registeredObjects)
                    {
                        getBindingsResp.bindings.Add(obj.Key, obj.Value.Description);
                    }
                    return(getBindingsResp);

                case SubscribeRequest subscribeReq:
                    var subscribeObj = _registeredObjects[subscribeReq.objectId];
                    subscribeObj.Subscribe(subscribeReq.eventId, callback);
                    var subscribeResponse = new SubscribeResponse()
                    {
                        objectId = subscribeReq.objectId,
                        eventId  = subscribeReq.eventId
                    };
                    return(subscribeResponse);

                case UnsubscribeRequest unsubscribeReq:
                    var unsubscribeObj = _registeredObjects[unsubscribeReq.objectId];
                    unsubscribeObj.Unsubscribe(unsubscribeReq.eventId, callback);
                    var unsubscribeResponse = new UnsubscribeResponse()
                    {
                        objectId = unsubscribeReq.objectId,
                        eventId  = unsubscribeReq.eventId
                    };
                    return(unsubscribeResponse);

                case PropertyGetRequest propertyGetReq:
                    var    propertyGetObj      = _registeredObjects[propertyGetReq.objectId];
                    object propertyGetValue    = propertyGetObj.GetValue(propertyGetReq.propertyId);
                    var    propertyGetResponse = new PropertyGetResponse()
                    {
                        objectId   = propertyGetReq.objectId,
                        propertyId = propertyGetReq.propertyId,
                        value      = propertyGetValue
                    };
                    return(propertyGetResponse);

                case PropertySetRequest propertySetReq:
                    var propertySetObj = _registeredObjects[propertySetReq.objectId];
                    propertySetObj.SetValue(propertySetReq.propertyId, propertySetReq.value);
                    var propertySetResponse = new PropertySetResponse()
                    {
                        objectId   = propertySetReq.objectId,
                        propertyId = propertySetReq.propertyId
                    };
                    return(propertySetResponse);

                case InvokeRequest invokeReq:
                    var    invokeObj      = _registeredObjects[invokeReq.objectId];
                    object invokeResult   = invokeObj.Invoke(invokeReq.methodId, invokeReq.methodArgs);
                    var    invokeResponse = new InvokeResponse()
                    {
                        objectId = invokeReq.objectId,
                        methodId = invokeReq.methodId,
                        result   = invokeResult
                    };
                    return(invokeResponse);

                default:
                    if (request != null)
                    {
                        throw new RecipientBindingException($"Unsupported request type: {request.requestType}");
                    }
                    else
                    {
                        throw new RecipientBindingException($"Request failed to deserialize.");
                    }
                }
            }
            catch (RecipientBindingException ex)
            {
                var exceptionResponse = new ExceptionResponse()
                {
                    exception = ex
                };

#pragma warning disable EA003 // Catch block swallows an exception
                return(exceptionResponse);
            }
#pragma warning restore EA003 // Catch block swallows an exception
        }
Beispiel #28
0
 private void UnsubscribeMessageHandler(UnsubscribeResponse messageData)
 {
     var data = messageData;
 }
 protected override void HandleUnsubscribeResponse(bool success)
 {
     UnsubscribeResponse?.Invoke(this, new StreamingEventArgs <bool>(success));
 }
Beispiel #30
0
        private void MessageReceived(object sender, BitmexSocketMessageEventArgs e)
        {
            if (PongResponse.TryParse(e.Message, OnPongResponse))
            {
                return;
            }

            var jsonElement = JsonDocument.Parse(e.Message).RootElement;

            if (jsonElement.TryGetProperty("table", out _))
            {
                if (TableResponse <AffiliateDto> .TryHandle(jsonElement, OnAffiliateResponse, SubscriptionType.affiliate))
                {
                    return;
                }
                if (TableResponse <AnnouncementDto> .TryHandle(jsonElement, OnAnnouncementResponse, SubscriptionType.announcement))
                {
                    return;
                }
                if (TableResponse <ChatDto> .TryHandle(jsonElement, OnChatResponse, SubscriptionType.chat))
                {
                    return;
                }
                if (TableResponse <ChatConnectedDto> .TryHandle(jsonElement, OnChatConnectedResponse, SubscriptionType.connected))
                {
                    return;
                }
                if (TableResponse <ExecutionDto> .TryHandle(jsonElement, OnExecutionResponse, SubscriptionType.execution))
                {
                    return;
                }
                if (TableResponse <FundingDto> .TryHandle(jsonElement, OnFundingResponse, SubscriptionType.funding))
                {
                    return;
                }
                if (TableResponse <InstrumentDto> .TryHandle(jsonElement, OnInstrumentResponse, SubscriptionType.instrument))
                {
                    return;
                }
                if (TableResponse <InsuranceDto> .TryHandle(jsonElement, OnInsuranceResponse, SubscriptionType.insurance))
                {
                    return;
                }
                if (TableResponse <LiquidationDto> .TryHandle(jsonElement, OnLiquidationResponse, SubscriptionType.liquidation))
                {
                    return;
                }
                if (TableResponse <MarginDto> .TryHandle(jsonElement, OnMarginResponse, SubscriptionType.margin))
                {
                    return;
                }
                if (TableResponse <OrderDto> .TryHandle(jsonElement, OnOrderResponse, SubscriptionType.order))
                {
                    return;
                }
                if (TableResponse <OrderBook10Dto> .TryHandle(jsonElement, OnOrderBook10Response, SubscriptionType.orderBook10))
                {
                    return;
                }
                if (TableResponse <OrderBookDto> .TryHandle(jsonElement, OnOrderBookL2Response, SubscriptionType.orderBookL2))
                {
                    return;
                }
                if (TableResponse <OrderBookDto> .TryHandle(jsonElement, OnOrderBookL225Response, SubscriptionType.orderBookL2_25))
                {
                    return;
                }
                if (TableResponse <PositionDto> .TryHandle(jsonElement, OnPositionResponse, SubscriptionType.position))
                {
                    return;
                }
                if (TableResponse <NotificationDto> .TryHandle(jsonElement, OnPrivateNotificationResponse, SubscriptionType.privateNotifications))
                {
                    return;
                }
                if (TableResponse <NotificationDto> .TryHandle(jsonElement, OnPublicNotificationResponse, SubscriptionType.publicNotifications))
                {
                    return;
                }
                if (TableResponse <QuoteDto> .TryHandle(jsonElement, OnQuoteResponse, SubscriptionType.quote))
                {
                    return;
                }
                if (TableResponse <QuoteDto> .TryHandle(jsonElement, OnQuote1DResponse, SubscriptionType.quoteBin1d))
                {
                    return;
                }
                if (TableResponse <QuoteDto> .TryHandle(jsonElement, OnQuote1HResponse, SubscriptionType.quoteBin1h))
                {
                    return;
                }
                if (TableResponse <QuoteDto> .TryHandle(jsonElement, OnQuote1MResponse, SubscriptionType.quoteBin1m))
                {
                    return;
                }
                if (TableResponse <QuoteDto> .TryHandle(jsonElement, OnQuote5MResponse, SubscriptionType.quoteBin5m))
                {
                    return;
                }
                if (TableResponse <SettlementDto> .TryHandle(jsonElement, OnSettlementResponse, SubscriptionType.settlement))
                {
                    return;
                }
                if (TableResponse <TradeDto> .TryHandle(jsonElement, OnTradeResponse, SubscriptionType.trade))
                {
                    return;
                }
                if (TableResponse <TradeDto> .TryHandle(jsonElement, OnTradeResponse, SubscriptionType.trade))
                {
                    return;
                }
                if (TableResponse <TradeBucketedDto> .TryHandle(jsonElement, OnTradeBucketed1DResponse, SubscriptionType.tradeBin1d))
                {
                    return;
                }
                if (TableResponse <TradeBucketedDto> .TryHandle(jsonElement, OnTradeBucketed1HResponse, SubscriptionType.tradeBin1h))
                {
                    return;
                }
                if (TableResponse <TradeBucketedDto> .TryHandle(jsonElement, OnTradeBucketed1MResponse, SubscriptionType.tradeBin1m))
                {
                    return;
                }
                if (TableResponse <TradeBucketedDto> .TryHandle(jsonElement, OnTradeBucketed5MResponse, SubscriptionType.tradeBin5m))
                {
                    return;
                }
                if (TableResponse <TransactionDto> .TryHandle(jsonElement, OnTransactionResponse, SubscriptionType.transact))
                {
                    return;
                }
                if (TableResponse <WalletDto> .TryHandle(jsonElement, OnWalletResponse, SubscriptionType.wallet))
                {
                    return;
                }
            }
            if (AuthenticationResponse.TryParse(jsonElement, OnAuthenticationResponse))
            {
                return;
            }
            if (CancelAllAfterResponse.TryHandle(jsonElement, OnCancelAllAfterResponse))
            {
                return;
            }
            //if (ErrorResponse.TryParse(jsonElement, OnErrorResponse)) return;
            if (SubscribeResponse.TryParse(jsonElement, OnSubscribeResponse))
            {
                return;
            }
            if (UnsubscribeResponse.TryParse(jsonElement, OnUnsubscribeResponse))
            {
                return;
            }
            if (WelcomeInfoResponse.TryParse(jsonElement, OnWelcomeInfoResponse))
            {
                return;
            }

            _logger.LogWarning($"Unknown type message.{e.Message}");
        }