Skip to content

Commit

Permalink
ISubscription should inherit IDisposable (#438)
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Sullivan <[email protected]>
  • Loading branch information
ColinSullivan1 authored Feb 25, 2021
1 parent 5e95f75 commit e7581ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/NATS.Client/IAsyncSubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NATS.Client
{
Expand All @@ -26,7 +23,7 @@ namespace NATS.Client
/// If the <see cref="IAsyncSubscription"/> is created without listening to the <see cref="MessageHandler"/>
/// event, no messages will be received until <see cref="Start()"/> has been called.
/// </remarks>
public interface IAsyncSubscription : ISubscription, IDisposable
public interface IAsyncSubscription : ISubscription
{
/// <summary>
/// Occurs when the <see cref="IAsyncSubscription"/> receives a message from the
Expand Down
3 changes: 2 additions & 1 deletion src/NATS.Client/ISubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +27,7 @@ namespace NATS.Client
/// </remarks>
/// <seealso cref="ISyncSubscription"/>
/// <seealso cref="IAsyncSubscription"/>
public interface ISubscription
public interface ISubscription : IDisposable
{
/// <summary>
/// Gets the subject for this subscription.
Expand Down
2 changes: 1 addition & 1 deletion src/NATS.Client/ISyncSubscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace NATS.Client
/// <see cref="ISyncSubscription"/> provides messages for a subject through calls
/// to <see cref="NextMessage()"/> and <see cref="NextMessage(int)"/>.
/// </summary>
public interface ISyncSubscription : ISubscription, IDisposable
public interface ISyncSubscription : ISubscription
{
/// <summary>
/// Returns the next <see cref="Msg"/> available to a synchronous
Expand Down

0 comments on commit e7581ac

Please sign in to comment.