Table of Contents

Interface GlueRuleExecutionState

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

Represents the current state of glue rule execution.

public interface GlueRuleExecutionState

Properties

Action

Gets the action which is performed by the element engine while executing the current rule.

LineageGlueRule.Action Action { get; }

Property Value

LineageGlueRule.Action

The action.

Bucket

The Bucket contains a readonly list of already constructed elements.

IList<Element> Bucket { get; }

Property Value

IList<Element>

SourceElement

Gets the source element which is used by all applicable glue rules accessing this state.

IElement SourceElement { get; }

Property Value

IElement

The source element.

SourceFlavorElement

The flavor element the rule is applied to.

FlavorElement SourceFlavorElement { get; }

Property Value

FlavorElement

Methods

AddElement(FlavorElement)

Adds a flavor element to the bucket and automatically transforms it into an element.

void AddElement(FlavorElement flavorElement)

Parameters

flavorElement FlavorElement

The flavor element to add.

Remarks

If Action is Replace, pass null to remove the SourceElement from the element tree.

Exceptions

ArgumentNullException

If flavorElement is null and Action is not Replace.

AddElement(FlavorElement, out Element)

Adds a flavor element to the bucket and automatically transforms it into an element.

void AddElement(FlavorElement flavorElement, out Element element)

Parameters

flavorElement FlavorElement

The flavor element to add.

element Element

When the method returns, contains the newly added Element or null if Action is Replace.

Remarks

If Action is Replace, pass null to remove the SourceElement from the element tree.

Exceptions

ArgumentNullException

If flavorElement is null and Action is not Replace.

InsertElement(int, FlavorElement)

Inserts a flavor element at the specified position into the bucket and automatically transforms it into an element.

void InsertElement(int index, FlavorElement flavorElement)

Parameters

index int

The index to insert the flavor element at.

flavorElement FlavorElement

The flavor element to insert.

Exceptions

ArgumentOutOfRangeException

If index is less than 0 or greater than the current size of the Bucket.

ArgumentNullException

If flavorElement is null and Action is not Replace.

InsertElement(int, FlavorElement, out Element)

Inserts a flavor element at the specified position into the bucket and automatically transforms it into an element.

void InsertElement(int index, FlavorElement flavorElement, out Element element)

Parameters

index int

The index to insert the flavor element at.

flavorElement FlavorElement

The flavor element to insert.

element Element

When the method returns, contains the newly inserted Element or null if Action is Replace.

Exceptions

ArgumentOutOfRangeException

If index is less than 0 or greater than the current size of the Bucket.

ArgumentNullException

If flavorElement is null and Action is not Replace.

SkipAll()

Instructs the engine to skip all rules after the current one.

void SkipAll()

SkipOutputFlavor(string)

Instructs the engine to skip all rules with a specific output flavor, if they have not already been executed.

void SkipOutputFlavor(string flavorName)

Parameters

flavorName string

The name of the output flavor whose rules are skipped.

Exceptions

ArgumentNullException

If flavorName is null.

SkipRule(string)

Instructs the engine to skip a rule with a given name, if it has not already been executed.

void SkipRule(string ruleName)

Parameters

ruleName string

The name of the rule to skip.

Exceptions

ArgumentNullException

If ruleName is null.