コード例 #1
0
        private void OnReady(GatewayEvent gatewayEvent)
        {
            var ready = gatewayEvent.GetData <Ready>();

            lastReady = ready;

            FireEventOnDelegate(gatewayEvent, Ready);
        }
コード例 #2
0
        private void FireEventOnDelegate <TEventData>(GatewayEvent gatewayEvent, EventHandler <GatewayEventArgs <TEventData> > eventHandler)
        {
            var eventArgs = new GatewayEventArgs <TEventData>(gatewayEvent.GetData <TEventData>());

            eventHandler?.Invoke(this, eventArgs);
        }
コード例 #3
0
 private void OnHelloReceived(GatewayEvent gatewayEvent)
 {
     IdentifySelfToGateway();
     BeginHeartbeatAsync(gatewayEvent.GetData <Hello>().HeartbeatInterval);
 }