public EmitterHandler(IHttpPipelineEmitter emitter) { _emitter = emitter; }
/// <summary> /// returns the request emitter as a pipeline handler. /// </summary> /// <param name="emitter">HTTP request distributer</param> /// <returns></returns> public static IHttpPipelineHandler AsHandler(this IHttpPipelineEmitter emitter) { return(new EmitterHandler(emitter)); }
/// <summary> /// join pipeline with a request emitter, create a http pipeline handler. /// </summary> /// <param name="pipeline">upstream pipeline</param> /// <param name="emitter">request emitter</param> /// <returns>http pipeline handler</returns> public static IHttpPipelineHandler Emit(this IHttpPipeline pipeline, IHttpPipelineEmitter emitter) { return(pipeline.Join(emitter.AsHandler())); }