示例#1
0
 override protected void Store()
 {
     name = "one";
     Store(this);
     CsEvaluationDelegate se1 = new CsEvaluationDelegate();
     se1.child = new CsEvaluationDelegate();
     se1.child.name = "three";
     se1.name = "two";
     Store(se1);
     se1 = new CsEvaluationDelegate();
     se1.child = new CsEvaluationDelegate();
     se1.child.name = "five";
     se1.name = "four";
     Store(se1);
 }
        void RunEvaluationDelegateTest(EvaluationDelegate evaluation)
        {
            IQuery q1  = NewQuery();
            IQuery cq1 = q1;

            q1.Constrain(GetType());
            cq1 = cq1.Descend("child");
            cq1.Constrain(evaluation);
            IObjectSet os = q1.Execute();

            Assert.AreEqual(1, os.Count);
            CsEvaluationDelegate se = (CsEvaluationDelegate)os.Next();

            Assert.AreEqual("two", se.name);
        }
        override protected void Store()
        {
            name = "one";
            Store(this);
            CsEvaluationDelegate se1 = new CsEvaluationDelegate();

            se1.child      = new CsEvaluationDelegate();
            se1.child.name = "three";
            se1.name       = "two";
            Store(se1);
            se1            = new CsEvaluationDelegate();
            se1.child      = new CsEvaluationDelegate();
            se1.child.name = "five";
            se1.name       = "four";
            Store(se1);
        }
            public void Evaluate(ICandidate candidate)
            {
                CsEvaluationDelegate obj = ((CsEvaluationDelegate)candidate.GetObject());

                candidate.Include(obj.name.Equals(_name));
            }