private static MidFunc GetStream(AllStreamResource allStream) => async(context, next) => { var options = new ReadAllStreamOperation(context.Request); var response = await allStream.Get(options, context.RequestAborted); await context.WriteResponse(response); };
private static MidFunc GetStream(AllStreamResource allStream) => next => async env => { var context = new OwinContext(env); var options = new ReadAllStreamOperation(context.Request); var response = await allStream.GetPage(options, context.Request.CallCancelled); using (new OptionalHeadRequestWrapper(context)) { await context.WriteHalResponse(response); } };