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); }
protected void OnSessionStarting() { SessionStarting?.Invoke(this); }
protected void OnSessionStarting() { SessionStatus = SessionStatus.Starting; SessionStarting?.Invoke(this, new EventArgs()); }