コード例 #1
0
        public override int CompareSameFact(IFact <ChessGame> that)
        {
            SimpleFact fact = that as SimpleFact;

            if (PropertyName == fact.PropertyName)
            {
                return(this.Value.CompareTo(fact.Value));
            }
            return(PropertyName.CompareTo(fact.PropertyName));
        }
コード例 #2
0
        public override bool Implies(IFact <ChessGame> that)
        {
            if (that == null)
            {
                return(false);
            }

            SimpleFact fact = that as SimpleFact;

            return(Implies(fact));
        }
コード例 #3
0
        public bool Implies(SimpleFact that)
        {
            if (that == null)
            {
                return(false);
            }

            var index = this.Value.IndexOf(",");
            var value = index > -1 ? this.Value.Remove(index) : this.Value;

            return(value.Equals(that.Value));
        }
コード例 #4
0
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SimpleFact fact = obj as SimpleFact;

            if (fact == null)
            {
                return(false);
            }

            return(Equals(fact));
        }
コード例 #5
0
        public bool Equals(SimpleFact that)
        {
            if (that == null)
            {
                return(false);
            }

            if (this.PropertyName.Equals(that.PropertyName))
            {
                return(this.Value.Equals(that.Value));
            }
            else
            {
                return(false);
            }
        }