ClassFindExpression<T>
Holds the definition of a Find Expression.
Definition
Namespace:ArtOfTest.Common
Assembly:ArtOfTest.WebAii.dll
Type Parameters:
T
A FindClause.
Syntax:
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0")]
public abstract class FindExpression<T> : IFindExpression where T : FindClause
Inheritance: objectFindExpression<T>
Derived Classes:
Implements:
Constructors
FindExpression(params string[])
Create a new FindExpression.
Declaration
public FindExpression(params string[] findClauses)
Parameters
findClauses
string[]
A string array of find clauses.
Properties
ChainStops
Gets the list of chain locations in the clauses.
Clauses
Gets the expression clauses
Constraints
Get any hierarchy constraints.
Declaration
[DataMember(Name = "Constraints")]
public IList<HierarchyConstraint> Constraints { get; }
Property Value
Implements
FindClauses
Gets or sets the find statement.
Declaration
[DataMember(Name = "Clauses")]
public IList<T> FindClauses { get; }
Property Value
IList<T>
HasConstraints
Gets whether this expression have hierarchy constraints
HasHierarchicalDependency
Gets whether this expression has any hierarchal dependencies.
Declaration
public bool HasHierarchicalDependency { get; }
Property Value
Implements
IsChained
Gets whether the search is chained.
StringRepresentation
Get the string representation of this expression.
Declaration
public string StringRepresentation { get; }
Property Value
Implements
SupportedSearchType
Gets the supported search type as a Type object.
Declaration
public abstract Type SupportedSearchType { get; }
Property Value
Implements
Methods
AddClause(string)
Add the clause to the collection.
Declaration
public abstract void AddClause(string clause)
Parameters
clause
The clause to add.
AddHierarchyConstraint(HierarchyConstraint)
Add a hierarchy constraint.
Declaration
public virtual void AddHierarchyConstraint(HierarchyConstraint constraint)
Parameters
constraint
The constraint to add
AppendChain(IFindExpression)
Append the passed in expression as a chain to the end of the expression.
Declaration
public void AppendChain(IFindExpression expression)
Parameters
expression
The expression to append.
Implements
AppendClauses(bool, params string[])
Append a set of clauses
CheckConstraints(ITargetElement)
Check the constraints of this target.
Declaration
public virtual bool CheckConstraints(ITargetElement target)
Parameters
target
Returns
GetClauses(int)
Get the list of clauses
Declaration
public IList<FindClause> GetClauses(int chainIndex)
Parameters
chainIndex
Returns
Implements
Initialize(string[])
Initialize this expression with a set of clauses.
Declaration
public virtual void Initialize(string[] clauses)
Parameters
clauses
string[]
The clauses to use.
Implements
Match(ITargetElement)
Match this expression against a target.
Declaration
public virtual bool Match(ITargetElement target)
Parameters
target
The target to match
Returns
True/False is this target matches
Implements
Remarks
This call with throw an ArgumentException if the expression has a hierarchical dependency.
Match(ITargetElement, IList<FindClause>, bool)
Match a set of clauses against a target.
Declaration
public virtual bool Match(ITargetElement target, IList<FindClause> clauses, bool ignoreConstraints)
Parameters
target
The target element to match.
clauses
The list of clauses to use during the match test.
ignoreConstraints
Whether or not to ignore any contraints contained in the clauses.
Returns
Implements
Match(ITargetElement, IList<FindClause>, bool, ITargetElement)
Match a specific set of clauses.
Declaration
public virtual bool Match(ITargetElement target, IList<FindClause> clauses, bool ignoreConstraints, ITargetElement root)
Parameters
target
The target element to match.
clauses
A list of clauses to test for a match.
ignoreConstraints
Whether or not to ignore any constraints attached to the clauses.
root
Root element of search tree.
Returns
Implements
ToString()
Returns the string representation of this FindExpression.
Declaration
public override string ToString()
Returns
The string.
Overrides
Update(string[])
Update this expression with the new expression
Declaration
public void Update(string[] expression)
Parameters
expression
string[]
Implements