Exemple #1
0
        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);
        }
Exemple #2
0
        private void AssertRegisteredStreamManipulators(params IStreamManipulator[] expected)
        {
            var actual = _Configuration.GetStreamManipulators();

            Assert.IsTrue(expected.SequenceEqual(actual));
        }