@@ -7,30 +7,30 @@ namespace RabbitMQ.Client.Impl
7
7
{
8
8
internal struct AsyncEventingWrapper < TEvent > where TEvent : AsyncEventArgs
9
9
{
10
- private event AsyncEventHandler < TEvent > ? _event ;
10
+ private event AsyncEventHandler < TEvent > ? _eventHandler ;
11
11
private Delegate [ ] ? _handlers ;
12
12
private string ? _context ;
13
13
private Func < Exception , string , CancellationToken , Task > ? _onException ;
14
14
15
- public bool IsEmpty => _event is null ;
15
+ public bool IsEmpty => _eventHandler is null ;
16
16
17
17
public AsyncEventingWrapper ( string context , Func < Exception , string , CancellationToken , Task > onException )
18
18
{
19
- _event = null ;
19
+ _eventHandler = null ;
20
20
_handlers = null ;
21
21
_context = context ;
22
22
_onException = onException ;
23
23
}
24
24
25
25
public void AddHandler ( AsyncEventHandler < TEvent > ? handler )
26
26
{
27
- _event += handler ;
27
+ _eventHandler += handler ;
28
28
_handlers = null ;
29
29
}
30
30
31
31
public void RemoveHandler ( AsyncEventHandler < TEvent > ? handler )
32
32
{
33
- _event -= handler ;
33
+ _eventHandler -= handler ;
34
34
_handlers = null ;
35
35
}
36
36
@@ -40,7 +40,7 @@ public Task InvokeAsync(object sender, TEvent parameter)
40
40
Delegate [ ] ? handlers = _handlers ;
41
41
if ( handlers is null )
42
42
{
43
- handlers = _event ? . GetInvocationList ( ) ;
43
+ handlers = _eventHandler ? . GetInvocationList ( ) ;
44
44
if ( handlers is null )
45
45
{
46
46
return Task . CompletedTask ;
@@ -78,7 +78,7 @@ await _onException(exception, _context!, @event.CancellationToken)
78
78
79
79
public void Takeover ( in AsyncEventingWrapper < TEvent > other )
80
80
{
81
- _event = other . _event ;
81
+ _eventHandler = other . _eventHandler ;
82
82
_handlers = other . _handlers ;
83
83
_context = other . _context ;
84
84
_onException = other . _onException ;
0 commit comments