Automation.UI.Tree.QueryParts.QueryConditionPart.ApplyCondition C# (CSharp) Method

ApplyCondition() private method

Applies the specified property condition to this query.
private ApplyCondition ( Condition condition ) : void
condition System.Windows.Automation.Condition The condition to apply.
return void
        internal void ApplyCondition(Condition condition)
        {
            // Apply the active unary condition.
            condition = ApplyUnaryOperator(condition);
            // If the current active condition is null, not need to apply the binary operator.
            // If it isn't null, apply the binary operator.
            if (Query.Conditions == null) Query.Conditions = condition;
            else Query.Conditions = JoinWithBinaryOperator(Query.Conditions, condition);
            // Reset the operators for the next condition.
            UnaryOperator = null;
            BinaryOperator = null;
        }