Class
FilterDescriptor

Represents declarative filtering.

Definition

Namespace:Telerik.DataSource

Assembly:Telerik.DataSource.dll

Syntax:

cs-api-definition
public class FilterDescriptor : FilterDescriptorBase, IFilterDescriptor

Inheritance: objectJsonObjectFilterDescriptorBaseFilterDescriptor

Implements: IFilterDescriptor

Inherited Members FilterDescriptorBase.CreateFilterExpression(Expression)JsonObject.ToJson()

Constructors

FilterDescriptor()

Initializes a new instance of the FilterDescriptor class.

Declaration

cs-api-definition
public FilterDescriptor()

FilterDescriptor(string, FilterOperator, object)

Initializes a new instance of the FilterDescriptor class.

Declaration

cs-api-definition
public FilterDescriptor(string member, FilterOperator filterOperator, object filterValue)

Parameters

member

string

The member.

filterOperator

FilterOperator

The filter operator.

filterValue

object

The filter value.

Properties

ConvertedValue

Declaration

cs-api-definition
[JsonIgnore]
public object ConvertedValue { get; }

Property Value

object

Member

Gets or sets the member name which will be used for filtering.

Declaration

cs-api-definition
public string Member { get; set; }

Property Value

string

MemberType

Gets or sets the type of the member that is used for filtering. Set this property if the member type cannot be resolved automatically. Such cases are: items with ICustomTypeDescriptor, XmlNode or DataRow. Changing this property did not raise

Declaration

cs-api-definition
[JsonIgnore]
public Type MemberType { get; set; }

Property Value

Type

The type of the member used for filtering.

Operator

Gets or sets the filter operator.

Declaration

cs-api-definition
public FilterOperator Operator { get; set; }

Property Value

FilterOperator

Value

Gets or sets the target filter value.

Declaration

cs-api-definition
[JsonConverter(typeof(ObjectConverter))]
public object Value { get; set; }

Property Value

object

Methods

CreateFilterExpression(ParameterExpression)

Creates a predicate filter expression.

Declaration

cs-api-definition
protected override Expression CreateFilterExpression(ParameterExpression parameterExpression)

Parameters

parameterExpression

ParameterExpression

The parameter expression, which will be used for filtering.

Returns

Expression

A predicate filter expression.

Overrides FilterDescriptorBase.CreateFilterExpression(ParameterExpression)

Equals(FilterDescriptor)

Determines whether the specified other descriptor is equal to the current one.

Declaration

cs-api-definition
public virtual bool Equals(FilterDescriptor other)

Parameters

other

FilterDescriptor

The other filter descriptor.

Returns

bool

True if all members of the current descriptor are equal to the ones of other, otherwise false.

Equals(object)

Determines whether the specified obj is equal to the current descriptor.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

Returns

bool

Overrides object.Equals(object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current filter descriptor.

Overrides object.GetHashCode()

Serialize(IDictionary<string, object>)

for internal use

Declaration

cs-api-definition
protected override void Serialize(IDictionary<string, object> json)

Parameters

json

IDictionary<string, object>

Overrides FilterDescriptorBase.Serialize(IDictionary<string, object>)

Extension Methods