Assembly: Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public override bool IsPrimary { get; } |
| Visual Basic (Declaration) |
|---|
Public Overrides ReadOnly Property IsPrimary As Boolean |
Implements
IPattern..::.IsPrimary
Remarks
A primary pattern is a pattern that defines the ultimate purpose of a code element and the nature of the tests or test parameters that are produced from it. Consequently the primary pattern is the only one on which the Consume(IPatternScope, ICodeElementInfo, Boolean) method will be called.
Each code element may have at most one primary pattern. It is an error for a code element to have more than one associated primary pattern.
If a code element does not have an associated primary pattern, its containing test may choose to apply default processing to it instead. For example, the containing test may give an opportunity to patterns associated with the code element to consume a test method parameter but will revert to default behavior if no primary patterns explicitly claim it.
Non-primary patterns still play a very important part in the construction of the test model. Non-primary patterns may implement the Process(IPatternScope, ICodeElementInfo) method to decorate tests and test parameters declared by the primary pattern.
