コード例 #1
0
 public RemoteRuleGraphActivator(ValidationGraph graph, RemoteRuleGraph remoteGraph, BehaviorGraph behaviorGraph, IRemoteRuleQuery remotes, ITypeDescriptorCache properties)
 {
     _graph = graph;
     _remoteGraph = remoteGraph;
     _behaviorGraph = behaviorGraph;
     _remotes = remotes;
     _properties = properties;
 }
コード例 #2
0
 public RemoteRuleGraphActivator(ValidationGraph graph, RemoteRuleGraph remoteGraph, BehaviorGraph behaviorGraph, IRemoteRuleQuery remotes, ITypeDescriptorCache properties)
 {
     _graph         = graph;
     _remoteGraph   = remoteGraph;
     _behaviorGraph = behaviorGraph;
     _remotes       = remotes;
     _properties    = properties;
 }
コード例 #3
0
        public void no_registration_when_no_rules_are_found()
        {
            theRemoteGraph = new RemoteRuleGraph();
            theServices.Add(theRemoteGraph);

            theModifier.Modify(theRequest);

            theRequest.CurrentTag.Data("remote-rule").ShouldBeNull();
        }
コード例 #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());
        }
コード例 #5
0
        public void SetUp()
        {
            theModifier = new RemoteValidationElementModifier();
            theTag = new HtmlTag("input");

            theRequest = ElementRequest.For<RemoteTarget>(x => x.Username);
            theRequest.ReplaceTag(theTag);

            theRemoteGraph = new RemoteRuleGraph();
            theRemoteRule = theRemoteGraph.RegisterRule(theRequest.Accessor, new UniqueUsernameRule());

            theUrls = new StubUrlRegistry();

            theServices = new InMemoryServiceLocator();
            theServices.Add(theRemoteGraph);
            theServices.Add(theUrls);

            theRequest.Attach(theServices);
        }
コード例 #6
0
ファイル: ValidateField.cs プロジェクト: RyanHauert/fubumvc
 public ValidateFieldEndpoint(RemoteRuleGraph graph, IRuleRunner rules, IAjaxContinuationResolver continuation)
 {
     _graph = graph;
     _rules = rules;
     _continuation = continuation;
 }
コード例 #7
0
ファイル: ValidateField.cs プロジェクト: maniacs-sfa/fubumvc
 public ValidateFieldEndpoint(RemoteRuleGraph graph, IRuleRunner rules, IAjaxContinuationResolver continuation)
 {
     _graph        = graph;
     _rules        = rules;
     _continuation = continuation;
 }
コード例 #8
0
 public void SetUp()
 {
     theGraph = new RemoteRuleGraph();
 }