File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 8
8
<s : String x : Key =" /Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue" >< Policy Inspect="True" Prefix="m_" Suffix="" Style="aaBb" /> </s : String >
9
9
<s : String x : Key =" /Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue" >< Policy Inspect="True" Prefix="s_" Suffix="" Style="aaBb" /> </s : String >
10
10
<s : String x : Key =" /Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue" >< Policy Inspect="True" Prefix="s_" Suffix="" Style="aaBb" /> </s : String >
11
- <s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue" >True</s : Boolean >
12
- <s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue" >True</s : Boolean >
13
- <s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue" >True</s : Boolean >
14
11
<s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue" >True</s : Boolean >
15
12
<s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue" >True</s : Boolean >
16
13
<s : Boolean x : Key =" /Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue" >True</s : Boolean >
Original file line number Diff line number Diff line change 1
- using System ;
2
1
using JetBrains . Annotations ;
3
2
using NetMQ . Monitoring ;
4
3
@@ -14,6 +13,5 @@ public interface ISocketPollableCollection
14
13
{
15
14
void Add ( [ NotNull ] ISocketPollable socket ) ;
16
15
void Remove ( [ NotNull ] ISocketPollable socket ) ;
17
- void RemoveAndDispose < T > ( T socket ) where T : ISocketPollable , IDisposable ;
18
16
}
19
17
}
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 ISocketPollableCollection m_attachedPoller ;
27
+ [ CanBeNull ] private NetMQPoller m_attachedPoller ;
28
28
private int m_cancel ;
29
29
30
30
private readonly ManualResetEvent m_isStoppedEvent = new ManualResetEvent ( true ) ;
@@ -208,15 +208,15 @@ private void InternalClose()
208
208
m_monitoringSocket . Disconnect ( Endpoint ) ;
209
209
}
210
210
catch ( Exception )
211
- { }
211
+ { }
212
212
finally
213
213
{
214
214
IsRunning = false ;
215
215
m_isStoppedEvent . Set ( ) ;
216
216
}
217
217
}
218
218
219
- public void AttachToPoller < T > ( T poller ) where T : ISocketPollableCollection
219
+ public void AttachToPoller ( [ NotNull ] NetMQPoller poller )
220
220
{
221
221
if ( poller == null )
222
222
throw new ArgumentNullException ( nameof ( poller ) ) ;
@@ -233,12 +233,12 @@ public void DetachFromPoller()
233
233
{
234
234
DetachFromPoller ( false ) ;
235
235
}
236
-
236
+
237
237
private void DetachFromPoller ( bool dispose )
238
238
{
239
239
if ( m_attachedPoller == null )
240
240
throw new InvalidOperationException ( "Not attached to a poller" ) ;
241
-
241
+
242
242
if ( dispose )
243
243
m_attachedPoller . RemoveAndDispose ( m_monitoringSocket ) ;
244
244
else
@@ -324,7 +324,7 @@ protected virtual void Dispose(bool disposing)
324
324
if ( ! disposing )
325
325
return ;
326
326
327
- bool attachedToPoller = m_attachedPoller != null ;
327
+ bool attachedToPoller = m_attachedPoller != null ;
328
328
329
329
if ( attachedToPoller )
330
330
{
You can’t perform that action at this time.
0 commit comments