public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention <SpecialPolicy>();
            registry.Import <SubModule>();

            Applied++;
        }
        public void ConfigureRegistry(FubuRegistry registry)
        {
            registry.Services(x =>
            {
                var handler = x.SetServiceIfNone(typeof(IValidationFailureHandler), typeof(ValidationFailureHandler));
                handler.Dependencies.Add(_policies);
            });

            registry
            .ApplyConvention(new ValidationConvention(_callMatcher.CallFilters.Matches));
        }
Esempio 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));
        }
Esempio n. 4
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));
        }
        public static void ApplySmartGridConventions(this FubuRegistry registry, Action <AppliesToExpression> configure)
        {
            var pool = new TypePool(null);

            pool.IgnoreCallingAssembly();

            var expression = new AppliesToExpression(pool);

            configure(expression);

            registry.ApplyConvention(new SmartGridConvention(pool));
        }
Esempio n. 6
0
 public ViewExpression RegisterActionLessViews(Func <Type, bool> viewTypeFilter, Action <BehaviorChain> configureChain)
 {
     _registry.ApplyConvention(new ActionLessViewConvention(_viewAttacher.Facilities, _viewAttacher.Types, viewTypeFilter, configureChain));
     return(this);
 }