Interface GlueRuleExecutionState
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
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
Methods
AddElement(FlavorElement)
Adds a flavor element to the bucket and automatically transforms it into an element.
void AddElement(FlavorElement flavorElement)
Parameters
flavorElementFlavorElementThe flavor element to add.
Remarks
If Action is Replace, pass
null to remove the SourceElement from the element tree.
Exceptions
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
flavorElementFlavorElementThe flavor element to add.
elementElementWhen the method returns, contains the newly added Element or
nullif Action is Replace.
Remarks
If Action is Replace, pass
null to remove the SourceElement from the element tree.
Exceptions
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
indexintThe index to insert the flavor element at.
flavorElementFlavorElementThe flavor element to insert.
Exceptions
- ArgumentOutOfRangeException
If
indexis less than 0 or greater than the current size of the Bucket.- ArgumentNullException
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
indexintThe index to insert the flavor element at.
flavorElementFlavorElementThe flavor element to insert.
elementElementWhen the method returns, contains the newly inserted Element or
nullif Action is Replace.
Exceptions
- ArgumentOutOfRangeException
If
indexis less than 0 or greater than the current size of the Bucket.- ArgumentNullException
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
flavorNamestringThe name of the output flavor whose rules are skipped.
Exceptions
- ArgumentNullException
If
flavorNameisnull.
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
ruleNamestringThe name of the rule to skip.
Exceptions
- ArgumentNullException
If
ruleNameisnull.