コード例 #1
0
 public void OnInvocationStarted(InvocationStartedEventDescriptor eventData)
 {
     _invocationEventBroadcaster.BroadcastEvent(new InvocationEvent
     {
         InvocationStarted = new InvocationStartedEvent
         {
             InvocationDescriptor = eventData.InvocationDescriptor.ToProto()
         }
     });
 }
コード例 #2
0
        private void BroadcastConnectionEvents(AppConnectionEvent connectionEvent)
        {
            var lifecycleEvent = new AppLifecycleEvent();

            if (connectionEvent.Type == ConnectionEventType.AppConnected)
            {
                lifecycleEvent.Connected = new AppConnectedEvent
                {
                    ConnectionDescriptor = connectionEvent.Connection.ToProto()
                };
            }
            else
            {
                lifecycleEvent.Disconnected = new AppDisconnectedEvent
                {
                    ConnectionDescriptor = connectionEvent.Connection.ToProto()
                };
            }
            _appLifecycleEventBroadcaster.BroadcastEvent(lifecycleEvent);
        }