File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
1
2
using JetBrains . Annotations ;
2
3
using NetMQ . Monitoring ;
3
4
@@ -13,5 +14,6 @@ public interface ISocketPollableCollection
13
14
{
14
15
void Add ( [ NotNull ] ISocketPollable socket ) ;
15
16
void Remove ( [ NotNull ] ISocketPollable socket ) ;
17
+ void RemoveAndDispose < T > ( T socket ) where T : ISocketPollable , IDisposable ;
16
18
}
17
19
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class NetMQMonitor : IDisposable
24
24
{
25
25
[ NotNull ] private readonly NetMQSocket m_monitoringSocket ;
26
26
private readonly bool m_ownsMonitoringSocket ;
27
- [ CanBeNull ] private NetMQPoller m_attachedPoller ;
27
+ [ CanBeNull ] private ISocketPollableCollection m_attachedPoller ;
28
28
private int m_cancel ;
29
29
30
30
private readonly ManualResetEvent m_isStoppedEvent = new ManualResetEvent ( true ) ;
@@ -216,7 +216,7 @@ private void InternalClose()
216
216
}
217
217
}
218
218
219
- public void AttachToPoller ( [ NotNull ] NetMQPoller poller )
219
+ public void AttachToPoller < T > ( T poller ) where T : ISocketPollableCollection
220
220
{
221
221
if ( poller == null )
222
222
throw new ArgumentNullException ( nameof ( poller ) ) ;
You can’t perform that action at this time.
0 commit comments