public void Record(IBrowserActionLogger logger) { if (this.IsRecording) { return; } this.recorder = new BackgroundRecorder(this.Driver, logger, Options.RecordingScanInterval); this.recorderThread = new Thread(recorder.DoWork) { IsBackground = true, Name = "BrowserRecorder" }; this.recorder.Start(); this.recorderThread.Start(); }
public void StopRecording() { if (!this.IsRecording) { return; } this.recorder.Stop(); this.recorderThread.Join(Options.RecordingScanInterval); if (this.recorderThread.ThreadState != ThreadState.Stopped) { this.recorderThread.Abort(); } this.recorderThread = null; this.recorder = null; }