/// <inheritdoc/> public void Dispose() { if (disposed) { return; } disposed = true; controller?.Dispose(); }
public void Dispose() { lock (statusLock) { if (isDisposed) { return; } if (Status != AssemblyRunnerStatus.Idle) { throw new InvalidOperationException("Cannot dispose"); } isDisposed = true; } controller?.Dispose(); discoveryCompleteEvent?.Dispose(); executionCompleteEvent?.Dispose(); }