private void OnReady(GatewayEvent gatewayEvent) { var ready = gatewayEvent.GetData <Ready>(); lastReady = ready; FireEventOnDelegate(gatewayEvent, Ready); }
private void FireEventOnDelegate <TEventData>(GatewayEvent gatewayEvent, EventHandler <GatewayEventArgs <TEventData> > eventHandler) { var eventArgs = new GatewayEventArgs <TEventData>(gatewayEvent.GetData <TEventData>()); eventHandler?.Invoke(this, eventArgs); }
private void OnHelloReceived(GatewayEvent gatewayEvent) { IdentifySelfToGateway(); BeginHeartbeatAsync(gatewayEvent.GetData <Hello>().HeartbeatInterval); }