/// <summary> /// Initializes a new instance of the <see cref="QueryValidation"/> class. /// </summary> /// <param name="pipelineFactory">The middleware pipeline factory.</param> public QueryValidation(IMiddlewarePipelineFactory pipelineFactory) { // Note: You could simply new-up a MiddlewarePipeline instance here and build it, // but this example uses a pipeline factory so you can share pipelines between // Azure Functions that have common requirements, without having to duplicate // code. this.pipeline = pipelineFactory.CreateForQuery <QueryValidationQueryParameters>(this.ExecuteAsync); }
/// <summary> /// Initializes a new instance of the <see cref="BodyValidation"/> class. /// </summary> /// <param name="pipelineFactory">The middleware pipeline factory.</param> public BodyValidationWithCustomResponse(IMiddlewarePipelineFactory pipelineFactory) { // Note: You could simply new-up a MiddlewarePipeline instance here and build it, // but this example uses a pipeline factory so you can share pipelines between // Azure Functions that have common requirements, without having to duplicate // code. this.pipeline = pipelineFactory.CreateForBody <BodyValidationBody>( this.ExecuteAsync, ResponseHelper.HandleValidationFailure); }
/// <summary> /// Initializes a new instance of the <see cref="Functions"/> class. /// </summary> /// <param name="pipelineFactory">The middleware pipeline factory.</param> public Functions(IMiddlewarePipelineFactory pipelineFactory) { this.pipelineFactory = pipelineFactory; }
/// <summary> /// Initializes a new instance of the <see cref="BodyValidation"/> class. /// </summary> /// <param name="pipelineFactory">The middleware pipeline factory.</param> public ExceptionHandler(IMiddlewarePipelineFactory pipelineFactory) { this.pipeline = pipelineFactory.Create(this.ExecuteAsync); }