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));
        }
        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<AuthorizationConvention>();

            registry.Navigation<AuthorizationNavigationRegistry>();

            registry.Services(x =>
            {
                x.ReplaceService<IAuthorizationFailureHandler,AuthorizationFailureHandler>();
            });
        }
        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<NavigationRootPolicy>(x =>
            {
                x.ForKey(DiagnosticKeys.Main);
                x.WrapWithChrome<DashboardChrome>();

                x.Alter(chain => chain.BehaviorChain.Route.Prepend("_fubu"));
            });

            registry.Navigation<DiagnosticsMenu>();
        }
        void IFubuRegistryExtension.Configure(FubuRegistry registry)
        {
            registry.Services(x =>
            {
                x.SetServiceIfNone<IValidationContinuationHandler, ValidationContinuationHandler>();
                x.SetServiceIfNone<IAjaxContinuationResolver, AjaxContinuationResolver>();
                x.SetServiceIfNone<IAjaxContinuationActivator, AjaxContinuationActivator>();
                x.AddService<IAjaxContinuationDecorator, StandardAjaxContinuationDecorator>();

                x.SetServiceIfNone<IModelBindingErrors, ModelBindingErrors>();

                x.SetServiceIfNone<IValidationFailureHandler, ValidationFailureHandler>();
                _validationPolicies
                    .Each(policy => x.AddService(typeof (IValidationFailurePolicy), policy));
            });

            registry
                .ApplyConvention(new ValidationConvention(_callMatcher.CallFilters.Matches));
        }
        void IFubuRegistryExtension.Configure(FubuRegistry registry)
        {
            registry
                .Services(x =>
                              {
                                  var validationRegistry = _validationRegistry as IValidationRegistration;
                                  var rulesRegistry = new FieldRulesRegistry(validationRegistry.FieldSources(), new TypeDescriptorCache());
                                  validationRegistry.RegisterFieldRules(rulesRegistry);

                                  x.AddService<IValidationSource>(new FieldRuleSource(rulesRegistry));
                                  x.SetServiceIfNone<IFieldRulesRegistry>(rulesRegistry);
                                  x.SetServiceIfNone<IValidator, Validator>();
                                  x.SetServiceIfNone<IValidationQuery, ValidationQuery>();
                                  x.SetServiceIfNone<IValidationContinuationHandler, ValidationContinuationHandler>();
                                  x.SetServiceIfNone<IFieldValidationQuery, FieldValidationQuery>();

                                  x.SetServiceIfNone<IValidationFailureHandler, ValidationFailureHandler>();
                                  _validationPolicies
                                      .Each(policy => x.AddService(typeof(IValidationFailurePolicy), policy));
                              });

            registry
                .ApplyConvention(new ValidationConvention(_callMatcher.CallFilters.Matches));
        }
 public void Configure(FubuRegistry registry)
 {
     registry.ApplyConvention<SpecialPolicy>();
     registry.Import<SubModule>();
     Applied++;
 }