From e7581acade6114bdc3e47880d34513c0d5c51b51 Mon Sep 17 00:00:00 2001 From: Colin Sullivan Date: Thu, 25 Feb 2021 14:48:27 -0700 Subject: [PATCH] ISubscription should inherit IDisposable (#438) Signed-off-by: Colin Sullivan --- src/NATS.Client/IAsyncSubscription.cs | 5 +---- src/NATS.Client/ISubscription.cs | 3 ++- src/NATS.Client/ISyncSubscription.cs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/NATS.Client/IAsyncSubscription.cs b/src/NATS.Client/IAsyncSubscription.cs index a86542fdc..079b7c33f 100644 --- a/src/NATS.Client/IAsyncSubscription.cs +++ b/src/NATS.Client/IAsyncSubscription.cs @@ -12,9 +12,6 @@ // limitations under the License. using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace NATS.Client { @@ -26,7 +23,7 @@ namespace NATS.Client /// If the is created without listening to the /// event, no messages will be received until has been called. /// - public interface IAsyncSubscription : ISubscription, IDisposable + public interface IAsyncSubscription : ISubscription { /// /// Occurs when the receives a message from the diff --git a/src/NATS.Client/ISubscription.cs b/src/NATS.Client/ISubscription.cs index c0b5e938c..02f162238 100644 --- a/src/NATS.Client/ISubscription.cs +++ b/src/NATS.Client/ISubscription.cs @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +using System; using System.Threading.Tasks; namespace NATS.Client @@ -26,7 +27,7 @@ namespace NATS.Client /// /// /// - public interface ISubscription + public interface ISubscription : IDisposable { /// /// Gets the subject for this subscription. diff --git a/src/NATS.Client/ISyncSubscription.cs b/src/NATS.Client/ISyncSubscription.cs index 7537770c4..19c826c57 100644 --- a/src/NATS.Client/ISyncSubscription.cs +++ b/src/NATS.Client/ISyncSubscription.cs @@ -19,7 +19,7 @@ namespace NATS.Client /// provides messages for a subject through calls /// to and . /// - public interface ISyncSubscription : ISubscription, IDisposable + public interface ISyncSubscription : ISubscription { /// /// Returns the next available to a synchronous