예제 #1
0
 public static OutputPipe <TInput> CurrentUserHas <TInput>(
     this IOutputPipe <TInput> pipe,
     Func <ClaimsPrincipal, TInput, bool> predicate,
     object error = null)
     where TInput : class =>
 pipe.GetRequiredService <IClaimValidationPipeFactory <TInput> >()
 .Resolve(predicate, error, pipe);
예제 #2
0
 public static OutputPipe <TOutput> Map <TInput, TOutput>(
     this IOutputPipe <TInput> pipe, Func <TInput, Task <TOutput> > mapping)
     where TInput : class
     where TOutput : class =>
 pipe.GetRequiredService <IMappingPipeFactory <TInput, TOutput> >()
 .Resolve(mapping, pipe);
예제 #3
0
 public static OutputPipe <TInput> UpdateEntity <TInput>(
     this IOutputPipe <TInput> pipe)
     where TInput : class =>
 pipe.GetRequiredService <IEntityUpdatePipeFactory <TInput> >()
 .Resolve(pipe);
예제 #4
0
 public static OutputPipe <TInput> InsertEntity <TInput>(
     this IOutputPipe <TInput> pipe)
     where TInput : class =>
 pipe.GetRequiredService <IEntityInsertionPipeFactory <TInput> >()
 .Resolve(pipe);
예제 #5
0
 public static OutputPipe <RestEntityCollection> MapToRestCollection <TInput, TOutput>(
     this IOutputPipe <IQueryable <TInput> > pipe, Func <TInput, TOutput> mapping)
     where TInput : class
     where TOutput : class =>
 pipe.GetRequiredService <ICollectionMappingPipeFactory <TInput, TOutput> >()
 .Resolve(mapping, pipe);
예제 #6
0
 public static QueryableSourcePipe <TInput, TOutput> SelectQueryableSource <TInput, TOutput>(
     this IOutputPipe <TInput> pipe,
     Func <IQueryableFactory, TInput, IQueryable <TOutput> > selection)
     where TOutput : class =>
 pipe.GetRequiredService <IQueryableSourcePipeFactory <TInput, TOutput> >()
 .Resolve(selection, pipe);