/// <summary> /// Setups up a background action with a task. /// </summary> /// <param name="operation">The background operation to be performed when start is called. The operation must return when the cancellation token is canceled.</param> public BackgroundOperation(BackgroundOperationFunc operation) : this() { _backgroundOperation = operation ?? throw new ArgumentNullException(nameof(operation)); }
/// <summary> /// Setups up a background action with a task. /// </summary> /// <param name="operation">The background operation to be performed when start is called. The operation must return when the cancellation token is canceled.</param> public BackgroundOperationDisposable(BackgroundOperationFunc operation) : base(operation) { }