public void SetUp()
        {
            e1 = MockRepository.GenerateStub<IHttpContentEncoding>();
            e2 = MockRepository.GenerateStub<IHttpContentEncoding>();

            e1.Stub(x => x.MatchingEncoding).Return(ContentEncoding.GZip);
            e2.Stub(x => x.MatchingEncoding).Return(ContentEncoding.Deflate);

            theEncoders = new HttpContentEncoders(new[] { e1, e2 });
        }
Exemplo n.º 2
0
        void IFubuRegistryExtension.Configure(FubuRegistry registry)
        {
            registry.Services(services =>
            {
                // This isn't something that changes very often at all
                var encodings = new IHttpContentEncoding[] { new GZipHttpContentEncoding(), new DeflateHttpContentEncoding() };
                var encoders = new HttpContentEncoders(encodings);
                services.SetServiceIfNone<IHttpContentEncoders>(encoders);
            });

            registry.ApplyConvention(new ContentCompressionConvention(_filters.Matches));
        }
Exemplo n.º 3
0
        void IFubuRegistryExtension.Configure(FubuRegistry registry)
        {
            registry.Services(services =>
            {
                // This isn't something that changes very often at all
                var encodings = new IHttpContentEncoding[] { new GZipHttpContentEncoding(), new DeflateHttpContentEncoding() };
                var encoders  = new HttpContentEncoders(encodings);
                services.SetServiceIfNone <IHttpContentEncoders>(encoders);
            });

            registry.ApplyConvention(new ContentCompressionConvention(_filters.Matches));
        }