Пример #1
0
        private void StateChangedEventHandler(HeaptrackSessionState newState)
        {
            if (newState == HeaptrackSessionState.Finished || newState == HeaptrackSessionState.Failed)
            {
                if (newState == HeaptrackSessionState.Finished)
                {
                    Task.Run(() => OnSessionFinished?.Invoke(this, new EventArgs()));
                }

                HeaptrackSession s = _currentSession;
                _currentSession = null;
                if (s != null)
                {
                    s.Destroy();
                }
            }
        }
Пример #2
0
 public void EndSession(GameFinishedEvent evt)
 {
     AddEvent(evt);
     OnSessionFinished?.Invoke();
 }