Class ComposedExpression
Base class for filter expressions.
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
public class ComposedExpression : FilterExpression
Constructors
ComposedExpression(FilterExpression, Operator, FilterExpression)
Initializes a new instance of the ComposedExpression class with the specified operator and left and right operands.
Declaration
public ComposedExpression(FilterExpression leftOperand, ComposedExpression.Operator op, FilterExpression rightOperand)
Parameters
Type | Name | Description |
---|---|---|
FilterExpression | leftOperand | The left operand. |
ComposedExpressionOperator | op | The operator. |
FilterExpression | rightOperand | The right operand. |
Properties
LeftOperand
Gets or sets the left operand of this composed expression.
Declaration
[DataMember]
public FilterExpression LeftOperand { get; set; }
Property Value
Type | Description |
---|---|
FilterExpression |
Op
Gets or sets the operator of this composed expression.
Declaration
[DataMember]
public ComposedExpression.Operator Op { get; set; }
Property Value
Type | Description |
---|---|
ComposedExpressionOperator |
RightOperand
Gets or sets the right operand of this composed expression.
Declaration
[DataMember]
public FilterExpression RightOperand { get; set; }
Property Value
Type | Description |
---|---|
FilterExpression |
Methods
Evaluate(ITypedKeyValueContainer)
Evaluates a filter expression for a given a set of field values.
Declaration
public override bool Evaluate(ITypedKeyValueContainer values)
Parameters
Type | Name | Description |
---|---|---|
ITypedKeyValueContainer | values | A set of field values. |
Returns
Type | Description |
---|---|
bool | true if the field values satisfy the expression, false otherwise. |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of the object, for display purposes. |
Overrides
Validate(IFieldDefinitions, bool)
Validates the filter expression against the provided field definitions.
Declaration
public override bool Validate(IFieldDefinitions fields, bool throwIfInvalid)
Parameters
Type | Name | Description |
---|---|---|
IFieldDefinitions | fields | The field definitions to validate against. |
bool | throwIfInvalid | If true, an exception will be thrown if invalid field names are encountered. If false, the return value will be set to false without an exception being thrown. |
Returns
Type | Description |
---|---|
bool | true if the filter expression is valid, given the provided field definitions. false otherwise. |