Пример #1
0
        public virtual bool HasCriteriaForField(string fieldName)
        {
            if (string.IsNullOrWhiteSpace(FieldName))
            {
                return(string.IsNullOrWhiteSpace(fieldName));
            }

            return(FieldName.Equals(fieldName, StringComparison.CurrentCultureIgnoreCase));
        }
Пример #2
0
        public bool Equals(IndexKey other)
        {
            if (other == null)
            {
                return(false);
            }

            return(FieldName.Equals(other.FieldName) &&
                   Descending == other.Descending);
        }
            // override object.Equals
            public override bool Equals(object obj)
            {
                if (obj == null || GetType() != obj.GetType())
                {
                    return(false);
                }

                FieldValue that = (FieldValue)obj;

                return(Value == that.Value &&
                       (FieldName != null ? FieldName.Equals(that.FieldName) : that.FieldName == null));
            }
Пример #4
0
        public override bool Equals(object obj)
        {
            CompositeProperty other = obj as CompositeProperty;

            if (other == null)
            {
                return(false);
            }
            return(ParentClassName.Equals(other.ParentClassName) &&
                   PropertyName.Equals(other.PropertyName) &&
                   Type.Equals(other.Type) &&
                   FieldName.Equals(other.FieldName));
        }
Пример #5
0
        public override bool Equals(object obj)
        {
            if (obj == null || (GetType() != obj.GetType() && !(obj is String)))
            {
                return(false);
            }

            OrderBy result = null;

            //
            // aqui não podemos usar o ToString diretamente pois o mesmo é sobrescrito e retorna o
            // DESC caso seja ordenação descendente
            //
            if (obj is String)
            {
                result = obj.ToString();
            }
            else
            {
                result = obj as OrderBy;
            }

            return(FieldName.Equals(result.FieldName, StringComparison.InvariantCultureIgnoreCase));
        }
Пример #6
0
 /// <summary>
 /// Проверка на совпадение имени поля с передаваемым. Регистр букв не учитывается
 /// </summary>
 /// <param name="fieldName">Имя поля</param>
 /// <returns></returns>
 public bool SameAs(string fieldName)
 {
     return(FieldName.Equals(fieldName, StringComparison.InvariantCultureIgnoreCase));
 }