private void ProcessStep(Step step) { if (_scenarioSteps.Peek().Equals(step)) { _scenarioSteps.Dequeue(); } else { OnSessionError?.Invoke(); } _session.AddStepResult(step); if (!_scenarioSteps.Any()) { OnSessionEnd?.Invoke(_session); } }
public void Dispose() { OnSessionEnd?.Invoke(this, this); ((IDisposable)Socket)?.Dispose(); }