Skip to content

Commit

Permalink
Updated interface to include Async events.
Browse files Browse the repository at this point in the history
  • Loading branch information
sspates committed Jan 24, 2024
1 parent 6b22255 commit 0efed45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/NATS.Client.Core/INatsConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ namespace NATS.Client.Core;

public interface INatsConnection : IAsyncDisposable
{
event AsyncEventHandler<NatsEventArgs>? ConnectionDisconnected;

event AsyncEventHandler<NatsEventArgs>? ConnectionOpened;

event AsyncEventHandler<NatsEventArgs>? ReconnectFailed;

event AsyncEventHandler<NatsMessageDroppedEventArgs>? MessageDropped;

INatsServerInfo? ServerInfo { get; }

NatsOpts Opts { get; }
Expand Down
4 changes: 0 additions & 4 deletions tests/NATS.Client.Core.Tests/NatsConnectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ public void InterfaceShouldHaveSamePublicPropertiesEventsAndMethodAsClass()
{
var name = classInfo.Name;

// TODO: enable this check when we have events pulled up to the interface
if (Regex.IsMatch(name, @"add_|remove_"))
continue;

interfaceMethods.Select(m => m.Name).Should().Contain(name);
}
}
Expand Down

0 comments on commit 0efed45

Please sign in to comment.