Class FieldExpression

The FieldExpression class represents a property or member of some data in a logical expression.

Inheritance
System.Object
FieldExpression
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Common
Assembly: EPiServer.Social.Common.dll
Version: 1.5.4
Syntax
public class FieldExpression : FilterExpression

Constructors

FieldExpression(String, Type)

Constructor

Declaration
public FieldExpression(string identifier, Type valueType)
Parameters
Type Name Description
System.String identifier

Unique identifier for the field

System.Type valueType

Type of value stored by the field represented by this expression

FieldExpression(String, Type, FieldExpression)

Constructor

Declaration
public FieldExpression(string identifier, Type valueType, FieldExpression parent)
Parameters
Type Name Description
System.String identifier

Unique identifier for the field

System.Type valueType

Type of value stored by the field represented by this expression

FieldExpression parent

Expression representing the parent field to this field.

Properties

HasParent

Returns true if the field represented by this expression has a parent field.

Declaration
public bool HasParent { get; }
Property Value
Type Description
System.Boolean

Identifier

Gets the unique identifier for this field.

Declaration
public string Identifier { get; }
Property Value
Type Description
System.String

Parent

Gets the expression representing the parent field to this field.

Declaration
public FieldExpression Parent { get; }
Property Value
Type Description
FieldExpression

ValueType

Gets the type of value stored by the field represented by this expression.

Declaration
public Type ValueType { get; }
Property Value
Type Description
System.Type

Methods

Accept(FilterExpressionVisitor)

Accepts a visitor capable of interpreting this expression.

Declaration
public override void Accept(FilterExpressionVisitor visitor)
Parameters
Type Name Description
FilterExpressionVisitor visitor

Visitor to be accepted

Overrides

Equals(Object)

Returns true if the specified object is equivalent to this FieldExpression, false otherwise.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object to be compared

Returns
Type Description
System.Boolean

True if the specified object is equivalent to this FieldExpression, false otherwise.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Gets the hash code for this FieldExpression.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Hash code

Overrides
System.Object.GetHashCode()

Operators

Equality(FieldExpression, Boolean)

Creates a new EqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator ==(FieldExpression field, bool value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Boolean value

Value to compare against the field

Returns
Type Description
FilterExpression

EqualToExpression for this field and the specified value

Equality(FieldExpression, DateTime)

Creates a new EqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator ==(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.DateTime value

Value to compare against the field

Returns
Type Description
FilterExpression

EqualToExpression for this field and the specified value

Equality(FieldExpression, Double)

Creates a new EqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator ==(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Double value

Value to compare against the field

Returns
Type Description
FilterExpression

EqualToExpression for this field and the specified value

Equality(FieldExpression, Int64)

Creates a new EqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator ==(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Int64 value

Value to compare against the field

Returns
Type Description
FilterExpression

EqualToExpression for this field and the specified value

Equality(FieldExpression, String)

Creates a new EqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator ==(FieldExpression field, string value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.String value

Value to compare against the field

Returns
Type Description
FilterExpression

EqualToExpression for this field and the specified value

GreaterThan(FieldExpression, DateTime)

Creates a new GreaterThanExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator>(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.DateTime value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanExpression for this field and the specified value

GreaterThan(FieldExpression, Double)

Creates a new GreaterThanExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator>(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Double value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanExpression for this field and the specified value

GreaterThan(FieldExpression, Int64)

Creates a new GreaterThanExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator>(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Int64 value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanExpression for this field and the specified value

GreaterThanOrEqual(FieldExpression, DateTime)

Creates a new GreaterThanOrEqualTo representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator >=(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.DateTime value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanOrEqualTo for this field and the specified value

GreaterThanOrEqual(FieldExpression, Double)

Creates a new GreaterThanOrEqualTo representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator >=(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Double value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanOrEqualTo for this field and the specified value

GreaterThanOrEqual(FieldExpression, Int64)

Creates a new GreaterThanOrEqualTo representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator >=(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Int64 value

Value to compare against the field

Returns
Type Description
FilterExpression

GreaterThanOrEqualTo for this field and the specified value

Inequality(FieldExpression, Boolean)

The inequality operator is not supported.

Declaration
public static FilterExpression operator !=(FieldExpression field, bool value)
Parameters
Type Name Description
FieldExpression field
System.Boolean value
Returns
Type Description
FilterExpression

Inequality(FieldExpression, DateTime)

The inequality operator is not supported.

Declaration
public static FilterExpression operator !=(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field
System.DateTime value
Returns
Type Description
FilterExpression

Inequality(FieldExpression, Double)

The inequality operator is not supported.

Declaration
public static FilterExpression operator !=(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field
System.Double value
Returns
Type Description
FilterExpression

Inequality(FieldExpression, Int64)

The inequality operator is not supported.

Declaration
public static FilterExpression operator !=(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field
System.Int64 value
Returns
Type Description
FilterExpression

Inequality(FieldExpression, String)

The inequality operator is not supported.

Declaration
public static FilterExpression operator !=(FieldExpression field, string value)
Parameters
Type Name Description
FieldExpression field
System.String value
Returns
Type Description
FilterExpression

LessThan(FieldExpression, DateTime)

Creates a new LessThan representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.DateTime value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

LessThan(FieldExpression, Double)

Creates a new LessThan representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Double value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

LessThan(FieldExpression, Int64)

Creates a new LessThan representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Int64 value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

LessThanOrEqual(FieldExpression, DateTime)

Creates a new LessThanOrEqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <=(FieldExpression field, DateTime value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.DateTime value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

LessThanOrEqual(FieldExpression, Double)

Creates a new LessThanOrEqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <=(FieldExpression field, double value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Double value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

LessThanOrEqual(FieldExpression, Int64)

Creates a new LessThanOrEqualToExpression representing a comparison of the field represented by this expression to the specified value.

Declaration
public static FilterExpression operator <=(FieldExpression field, long value)
Parameters
Type Name Description
FieldExpression field

Expression identifying field to be compared

System.Int64 value

Value to compare against the field

Returns
Type Description
FilterExpression

LessThan for this field and the specified value

Extension Methods

arrow_upward