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