public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            ExpressionValueSource other = (ExpressionValueSource)obj;

            if (expression == null)
            {
                if (other.expression != null)
                {
                    return(false);
                }
            }
            else
            {
                if (!expression.Equals(other.expression))
                {
                    return(false);
                }
            }
            if (needsScores != other.needsScores)
            {
                return(false);
            }
            if (!Arrays.Equals(variables, other.variables))
            {
                return(false);
            }
            return(true);
        }
示例#2
0
 internal ExpressionSortField(string name, ExpressionValueSource source, bool reverse)
     : base(name, SortFieldType.CUSTOM, reverse)
 {
     this.source = source;
 }
		internal ExpressionSortField(string name, ExpressionValueSource source, bool reverse
			) : base(name, Type_e.CUSTOM, reverse)
		{
			this.source = source;
		}