示例#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);
 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);
 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);