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 ;
12using JetBrains . Annotations ;
23using NetMQ . Monitoring ;
34
@@ -13,5 +14,6 @@ public interface ISocketPollableCollection
1314 {
1415 void Add ( [ NotNull ] ISocketPollable socket ) ;
1516 void Remove ( [ NotNull ] ISocketPollable socket ) ;
17+ void RemoveAndDispose < T > ( T socket ) where T : ISocketPollable , IDisposable ;
1618 }
1719}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public class NetMQMonitor : IDisposable
2424 {
2525 [ NotNull ] private readonly NetMQSocket m_monitoringSocket ;
2626 private readonly bool m_ownsMonitoringSocket ;
27- [ CanBeNull ] private NetMQPoller m_attachedPoller ;
27+ [ CanBeNull ] private ISocketPollableCollection m_attachedPoller ;
2828 private int m_cancel ;
2929
3030 private readonly ManualResetEvent m_isStoppedEvent = new ManualResetEvent ( true ) ;
@@ -216,7 +216,7 @@ private void InternalClose()
216216 }
217217 }
218218
219- public void AttachToPoller ( [ NotNull ] NetMQPoller poller )
219+ public void AttachToPoller < T > ( T poller ) where T : ISocketPollableCollection
220220 {
221221 if ( poller == null )
222222 throw new ArgumentNullException ( nameof ( poller ) ) ;
You can’t perform that action at this time.
0 commit comments