Beispiel #1
0
        public SimpleFilter(LogicalConnection logicalConnection, string propertyName, FilteringOperator filteringOperator, object searchValue)
        {
            if (string.IsNullOrWhiteSpace(propertyName))
            {
                throw new ArgumentException($"{propertyName} can not be empty", nameof(propertyName));
            }

            if (filteringOperator == null)
            {
                throw new ArgumentNullException(nameof(filteringOperator));
            }

            if (logicalConnection == null)
            {
                throw new ArgumentNullException(nameof(logicalConnection));
            }

            PropertyName      = propertyName;
            Operator          = filteringOperator;
            SearchValue       = searchValue;
            LogicalConnection = logicalConnection;
        }
 public bool Equals(FilteringOperator obj)
 {
     return(obj != null &&
            obj.DisplayName == DisplayName &&
            obj.Value == Value);
 }
Beispiel #3
0
 public SimpleFilter(string logicalConnection, string propertyName, string filteringOperator, object searchValue) :
     this(LogicalConnection.From(logicalConnection), propertyName, FilteringOperator.FromDisplayName(filteringOperator), searchValue)
 {
 }
Beispiel #4
0
 public SimpleFilter(string propertyName, string filteringOperator, object searchValue) :
     this(propertyName, FilteringOperator.FromDisplayName(filteringOperator), searchValue)
 {
 }
Beispiel #5
0
 public SimpleFilter(string propertyName, FilteringOperator filteringOperator, object searchValue) : this(LogicalConnection.And, propertyName, filteringOperator, searchValue)
 {
 }