private static void AddUseCase <TUseCase, TInput>(this IPipelineProviderBuilder builder) where TInput : Boundaries.IUseCaseInput where TUseCase : Boundaries.IUseCase <TInput> { builder.On <TInput>().PipelineAsync() .Call <TUseCase>((handler, request) => handler.Execute(request)); }
private static void AddIdentitiesUsersMediator(IPipelineProviderBuilder builder) { builder.On <Application.UseCases.V1.Countries.Get.InputData>().CancellablePipelineAsync() .Call <Application.UseCases.V1.Countries.Get.IUseCase>((handler, request, cancellationToken) => handler.Execute(request, cancellationToken)); builder.On <Application.UseCases.V1.Countries.Find.InputData>().PipelineAsync() .Call <Application.UseCases.V1.Countries.Find.IUseCase>((handler, request) => handler.Execute(request)); builder.On <Application.UseCases.V1.Countries.GetByRegion.InputData>().PipelineAsync() .Call <Application.UseCases.V1.Countries.GetByRegion.IUseCase>((handler, request) => handler.Execute(request)); builder.On <Application.UseCases.V1.Countries.GetRoute.InputData>().PipelineAsync() .Call <Application.UseCases.V1.Countries.GetRoute.IUseCase>((handler, request) => handler.Execute(request)); }
public PipelineBehavior(IPipelineProviderBuilder pipelineProviderBuilder) { _pipelineProviderBuilder = pipelineProviderBuilder; }