/// <inheritdoc/> public void Dispose() { lock (statusLock) { if (disposed) { return; } if (Status != AssemblyRunnerStatus.Idle) { throw new InvalidOperationException("Cannot dispose the assembly runner when it's not idle"); } disposed = true; } controller.SafeDispose(); discoveryCompleteEvent.SafeDispose(); executionCompleteEvent.SafeDispose(); }