コード例 #1
0
        public void Configure(BehaviorGraph graph)
        {
            var settings = graph.Settings.Get <ValidationSettings>();
            var query    = new RemoteRuleQuery(settings.Filters);

            graph.Services.SetServiceIfNone(typeof(IRemoteRuleQuery), ObjectDef.ForValue(query));
        }
コード例 #2
0
        public void SetUp()
        {
            theRule = new RequiredFieldRule();
            f1      = MockRepository.GenerateStub <IRemoteRuleFilter>();
            f2      = MockRepository.GenerateStub <IRemoteRuleFilter>();

            theQuery = new RemoteRuleQuery(new[] { f1, f2 });
        }
コード例 #3
0
        public void SetUp()
        {
            theBehaviorGraph = BehaviorGraph.BuildFrom(r =>
            {
                r.Actions.IncludeType <RemoteRuleGraphEndpoint>();
                r.Import <FubuMvcValidation>();
            });

            theValidationGraph = ValidationGraph.BasicGraph();
            theRuleGraph       = new RemoteRuleGraph();
            theQuery           = RemoteRuleQuery.Basic();

            theActivator = new RemoteRuleGraphActivator(theValidationGraph, theRuleGraph, theBehaviorGraph, theQuery, new TypeDescriptorCache());

            theActivator.Activate(new IPackageInfo[0], new PackageLog());
        }
コード例 #4
0
        public void SetUp()
        {
            theBehaviorGraph = BehaviorGraph.BuildFrom(r =>
            {
                r.Actions.IncludeType <RemoteRuleGraphEndpoint>();
                r.Features.Validation.Enable(true);
            });

            theValidationGraph = ValidationGraph.BasicGraph();
            theRuleGraph       = new RemoteRuleGraph();
            theQuery           = RemoteRuleQuery.Basic();

            theActivator = new RemoteRuleGraphActivator(theValidationGraph, theRuleGraph, theBehaviorGraph, theQuery, new TypeDescriptorCache());

            theActivator.Activate(new ActivationLog(), new PerfTimer());
        }