A Sandcastle Documented Class Library

# State AddCondition Method (HierarchyUsage, ParameterToken, ComparisonOperator)

Adds a new HierarchyCondition to the internal condition collection.

Namespace: Dundas.BI.Entities.MetricSets
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public HierarchyCondition AddCondition(
    	HierarchyUsage hierarchy,
    	ParameterToken token,
    	ComparisonOperator comparisonOperator
    )

    Public Function AddCondition (
    	hierarchy As HierarchyUsage,
    	token As ParameterToken,
    	comparisonOperator As ComparisonOperator
    ) As HierarchyCondition

    public:
    HierarchyCondition^ AddCondition(
    	HierarchyUsage^ hierarchy,
    	ParameterToken^ token,
    	ComparisonOperator comparisonOperator
    )

    member AddCondition :
            hierarchy : HierarchyUsage *
            token : ParameterToken *
            comparisonOperator : ComparisonOperator -> HierarchyCondition

#### Parameters

hierarchy
  Type: Dundas.BI.Entities.MetricSets
  HierarchyUsage
  The hierarchy.
token
  Type: Dundas.BI.Data.Parameters.Tokens
  ParameterToken
  The target parameter token.
comparisonOperator
  Type: Dundas.BI.Entities.MetricSets
  ComparisonOperator
  The comparison operator.

#### Return Value

Type: HierarchyCondition
The newly added HierarchyCondition.
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | hierarchy or token is .
ArgumentException | hierarchy is not a time compatible hierarchy.

Remarks
Comparison operators other than equality are valid only for time compatible hierarchies.
See Also

#### Reference

State Class
AddCondition Overload
Dundas.BI.Entities.MetricSets Namespace