/// <summary> /// Builds an operation that throws a <see cref="OpExecutionDeemedNotApplicableException"/>. /// </summary> /// <typeparam name="TValue">The type of value.</typeparam> /// <param name="details">OPTIONAL details to use with the exception. DEFAULT is to omit details.</param> /// <returns> /// The operation. /// </returns> public static ThrowOpExecutionDeemedNotApplicableExceptionOp <TValue> NotApplicable <TValue>( string details = null) { var result = new ThrowOpExecutionDeemedNotApplicableExceptionOp <TValue>(details); return(result); }
/// <inheritdoc /> public TValue Execute( ThrowOpExecutionDeemedNotApplicableExceptionOp <TValue> operation) { if (operation == null) { throw new ArgumentNullException(nameof(operation)); } throw new OpExecutionDeemedNotApplicableException(operation.Details, operation); }
/// <inheritdoc /> public async Task <TValue> ExecuteAsync( ThrowOpExecutionDeemedNotApplicableExceptionOp <TValue> operation) { if (operation == null) { throw new ArgumentNullException(nameof(operation)); } await Task.FromResult(0); throw new OpExecutionDeemedNotApplicableException(operation.Details, operation); }