public void Start() { if (Running.IsCompleted) { throw new InvalidOperationException("Service was running and is being started again"); } if (_startAction != null) { _startAction(); } WasRunning.Complete(true); Running.Complete(true); }
public void Start() { if (Running.IsCompleted) { throw new InvalidOperationException("Service was running and is being started again"); } if (_startAction != null) { _startAction(); } WasRunning.Complete(true); Running.Complete(true); }