/// <summary>
        /// Initializes a new instance of the <see cref="BodyValidation"/> class.
        /// </summary>
        /// <param name="pipelineFactory">The middleware pipeline factory.</param>
        public BodyValidation(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);
        }