Esempio n. 1
0
        public async Task <EventSession> StartSessionAsync(TraceProfileDescriptor descriptor)
        {
            if (runningSession != null)
            {
                throw new InvalidOperationException("Session already in progress.");
            }

            var traceLog = new TraceLog();
            var session  = new EventSession(descriptor, traceLog);

            SessionStarting?.Invoke(traceLog);

            await session.StartAsync();

            runningSession = session;
            SessionStarted?.Invoke(runningSession);
            return(session);
        }
Esempio n. 2
0
 protected void OnSessionStarting()
 {
     SessionStarting?.Invoke(this);
 }
Esempio n. 3
0
 protected void OnSessionStarting()
 {
     SessionStatus = SessionStatus.Starting;
     SessionStarting?.Invoke(this, new EventArgs());
 }