コード例 #1
0
        public virtual bool HasCriteriaForField(string fieldName)
        {
            if (string.IsNullOrWhiteSpace(FieldName))
            {
                return(string.IsNullOrWhiteSpace(fieldName));
            }

            return(FieldName.Equals(fieldName, StringComparison.CurrentCultureIgnoreCase));
        }
コード例 #2
0
ファイル: IndexKey.cs プロジェクト: khooversoft/Toolbox
        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
ファイル: OrderBy.cs プロジェクト: pedrotrl/Unimake.Framework
        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));
 }