예제 #1
0
 public static OutputPipe <TEntity> InvalidWhen <TEntity>(
     this IOutputPipe <TEntity> pipe,
     Func <TEntity, bool> invalidCheck,
     int statusCode,
     object error = null)
     where TEntity : class =>
 pipe.InvalidWhen(e => Task.FromResult(invalidCheck(e)), statusCode, error);
예제 #2
0
 public static OutputPipe <TInput> InvalidWhen <TInput>(
     this IOutputPipe <TInput> pipe,
     Func <bool> invalidCheck,
     int statusCode,
     object error = null)
     where TInput : class =>
 pipe.InvalidWhen(() => Task.FromResult(invalidCheck()), statusCode, error);