Processes a code element and applies its contributions to the scope of this pattern. The scope will typically have been introduced by the Consume(IPatternScope, ICodeElementInfo, Boolean) method of a primary pattern applied to this code element.

Namespace:  Gallio.Framework.Pattern
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
void Process(
	IPatternScope scope,
	ICodeElementInfo codeElement
)
Visual Basic (Declaration)
Sub Process ( _
	scope As IPatternScope, _
	codeElement As ICodeElementInfo _
)

Parameters

scope
Type: Gallio.Framework.Pattern..::.IPatternScope
The scope.
codeElement
Type: Gallio.Common.Reflection..::.ICodeElementInfo
The code element to process.

Remarks

This method is used by patterns to decorate tests and test parameters that have been declared by primary patterns.

For example, the Process(IPatternScope, ICodeElementInfo) method will typically be called by another pattern that has just created a new test based on the associated code element, such as a test method. The method then has the opportunity to modify the test to add metadata, change its name, add new behaviors, and so on.

Exceptions

ExceptionCondition
Gallio.Framework.Pattern..::.PatternUsageErrorExceptionMay be thrown to halt processing of the pattern and report an error message to the user as an annotation that describes how the pattern was misapplied.

See Also