I have a service that returns a Subject<T> and consumer is subscribing to it.
How would I cancel an existing subscription and dispose it?
I have a service that returns a Subject<T> and consumer is subscribing to it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you call Subscribe() on your
Subject<T>, it returns anIDisposable. Just call Dispose() on the returned handle, and it will cancel the subscription.