Udostępnij za pośrednictwem


CriteriaCompareType

Applies To: Operations Manager 2007 R2

The CriteriaCompareType simple data type is used within modules to compare two ValueExpressionType data type values.

The CriteriaCompareType data type is generally used from within the SimpleCriteriaType schema data type.

Schema Definition

<xsd:simpleType name="CriteriaCompareType">
  <xsd:restriction base="xsd:string">
    <xsd:enumeration value="Equal"/>
    <xsd:enumeration value="NotEqual"/>
    <xsd:enumeration value="Greater"/>
    <xsd:enumeration value="Less"/>
    <xsd:enumeration value="GreaterEqual"/>
    <xsd:enumeration value="LessEqual"/>
  </xsd:restriction>
</xsd:simpleType>

Remarks

A CriteriaCompareType data type compares two ValueExpressionType data types (left side and right side) with a simple operator of the types described in the following table.

Operator Description

NotEqual

Evaluates to true if the left side of the expression is not equal to the right side. This evaluation is case-insensitive by default.

Greater

Evaluates to true if the left side of the expression is greater in value than the right side. This is a string comparison by default.

Less

Evaluates to true if the left side of the expression is less in value than the right side. This is a string comparison by default.

GreaterEqual

Evaluates to true if the left side of the expression is greater than or equal in value to the right side. This is a string comparison by default.

LessEqual

Evaluates to true if the left side of the expression is less than or equal in value to the right side. This is a string comparison by default.

The following sample XML uses the “Equal” operator to compare two values. The left value is a constant string. The right value is an XPath query into the incoming data item. The $Data reference is not required because implementation of the XPathQuery element implies it.

<Expression>
  <SimpleExpression>
    <ValueExpression>
      <Value>EventCreate</Value>
    </ValueExpression>
    <Operator>Equal</Operator>
    <ValueExpression>
      <XPathQuery>PublisherName</XPathQuery>
    </ValueExpression>
  </SimpleExpression>
</Expression>

For more samples and further explanation, see ValueExpressionType.

Information

   

Schema Type

System.ExpressionEvaluatorSchema

Library

System.Library