IsPass Method (.NET)

The IsPass method returns a boolean indicating whether a specific RET test returned a result of Pass.

 

Syntax:

bool outcome = ruleEngineResult.IsPass(string ruleID);

 

Returns:

outcome: True if the specified test ID resulted in a condition of Pass, based on the rule conditions as defined in the RET XML data.

ruleID: The ID of the rule to check, as defined in the XML

 

C# Example:

<%

...

if (ruleEngineResult.IsPass("myrule") == true) {

   // If we are here then the rule "myrule" passed

}

%>

 

 For reference, the ID to pass in comes from the 'id' parameter of the XML rule you wish to check.

With the XML below, the code above would return the results from the platform check since 'myrule'

is the assigned ID for that test.

 

  <test id='myrule' name='Platform Check'>

     ...

  </test>

 

Tip: See the rules-dataset.aspx sample for a full demonstration of this method.

 

Note: This method requires the Enterprise Edition of BrowserHawk

 

See Also:

PassCount Property (.NET)

PassIds Property (.NET)

IsFail Method (.NET)

IsInfo Method (.NET)

IsSuppress Method (.NET)

IsWarn Method (.NET)

About the RuleEngineResult Class

About the RuleEngine Class

About Rules Enforcement Technology (RET)