Class AtomicExpression
Represents an atomic expression, where a field must be in a specified relationship to a value.
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class AtomicExpression : FilterExpression
Constructors
AtomicExpression(FieldValue, AtomicExpression.Operator)
Initializes a new instance of the AtomicExpression class with the given field, value and operator.
Declaration
public AtomicExpression(FieldValue value, AtomicExpression.Operator op)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldValue | value | The field value containing both the field name and the value to use for comparison. |
| AtomicExpression.Operator | op | The operator. |
Properties
Op
Gets or sets the operator for this atomic expression.
See description of enum Operator values for a list of compatible types and operators.
Declaration
public AtomicExpression.Operator Op { get; set; }
Property Value
| Type | Description |
|---|---|
| AtomicExpression.Operator |
Value
Gets or sets the Value for this atomic expression.
This property should be set before the operator Op property.
Declaration
public FieldValue Value { get; set; }
Property Value
| Type | Description |
|---|---|
| FieldValue |
Methods
Evaluate(ITypedKeyValueContainer)
Declaration
public override bool Evaluate(ITypedKeyValueContainer values)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypedKeyValueContainer | values | A set of field values. |
Returns
| Type | Description |
|---|---|
| Boolean | true if the field values satisfy the expression, false otherwise. |
Overrides
ToString()
System.Object.ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | A string representation of the object, for display purposes. |
Overrides
Validate(IFieldDefinitions, Boolean)
Declaration
public override bool Validate(IFieldDefinitions fields, bool throwIfInvalid)
Parameters
| Type | Name | Description |
|---|---|---|
| IFieldDefinitions | fields | The field definitions to validate against. |
| Boolean | 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 |
|---|---|
| Boolean | true if the filter expression is valid, given the provided field definitions. false otherwise. |