private void UseResponseStreamWrapper(IAppBuilder app) { var wrapper = Factory.Resolve <IResponseStreamWrapper>(); wrapper.Initialise(_WebAppConfiguration.GetStreamManipulators()); var middleware = new Func <AppFunc, AppFunc>(wrapper.WrapResponseStream); app.Use(middleware); }
private void AssertRegisteredStreamManipulators(params IStreamManipulator[] expected) { var actual = _Configuration.GetStreamManipulators(); Assert.IsTrue(expected.SequenceEqual(actual)); }