mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 06:41:50 +01:00
Fixed: Nullable Eventhandler
This commit is contained in:
parent
a70eecd991
commit
1be9ffbf8a
@ -274,7 +274,7 @@ namespace Capnp.Rpc
|
||||
/// <summary>
|
||||
/// State of Connection has changed
|
||||
/// </summary>
|
||||
public event EventHandler<ConnectionStateChange> ConnectionStateChanged;
|
||||
public event EventHandler<ConnectionStateChange>? ConnectionStateChanged;
|
||||
|
||||
private ConnectionState _State = ConnectionState.Initializing;
|
||||
|
||||
@ -295,11 +295,7 @@ namespace Capnp.Rpc
|
||||
};
|
||||
_State = value;
|
||||
|
||||
EventHandler<ConnectionStateChange> eventHandler = ConnectionStateChanged;
|
||||
if(eventHandler != null)
|
||||
{
|
||||
eventHandler(this, args);
|
||||
}
|
||||
ConnectionStateChanged?.Invoke(this, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user