A condition is a simple light-weight mechanism for evaluating conditional expressions in a given context.

Namespace:  Gallio.Common
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.378.0)

Syntax

C#
public sealed class Condition
Visual Basic (Declaration)
Public NotInheritable Class Condition

Remarks

Conditions are most useful for defining declarative conditional activation expressions in Traits. For example, we might wish to automatically activate a plugin or enable an action when a given property appears in the conditional context.

The currently-supported conditional expression syntax is as follows:

  • "${namespace:identifier}": Specifies a condition based on the existence of a property with a particular identifier within the specified namespace. eg. "${env:VariableName}" might evaluate to true if the "VariableName" environment variable is defined.
  • "ExprA or ExprB": Given two conditions ExprA and ExprB produces a combined condition that evaluates to true when either on is true.
  • An empty condition is invalid.

Note: This abstraction is a work in progress. If you need additional conditional expression types, operators or combinators please post a feature request to the Gallio issue tracker. Later we may open this up similar to the test Filter mechanism.

Inheritance Hierarchy

System..::.Object
  Gallio.Common..::.Condition

See Also

Condition Members