Example #1
0
        private static MidFunc SetStreamMetadata(StreamMetadataResource streamsMetadata)
        => async(context, next) =>
        {
            var options = await SetStreamMetadataOperation.Create(context.Request, context.RequestAborted);

            var response = await streamsMetadata.Post(options, context.RequestAborted);

            await context.WriteResponse(response);
        };
Example #2
0
        private static MidFunc SetStreamMetadata(StreamMetadataResource streamsMetadata)
        => next => async env =>
        {
            var context = new OwinContext(env);

            var options = await SetStreamMetadataOperation.Create(context.Request, context.Request.CallCancelled);

            var response = await streamsMetadata.SetStreamMetadata(options, context.Request.CallCancelled);

            await context.WriteHalResponse(response);
        };