IsFail Method (.NET)

The IsFail method returns a boolean indicating whether a specific RET test returned a result of Fail.

 

Syntax:

bool outcome = ruleEngineResult.IsFail(string ruleID);

 

Returns:

outcome: True if the specified test ID resulted in a condition of Fail, 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.IsFail("myrule") == true) {

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

}

%>

 

 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:

FailCount Properties (.NET)

FailIds Property (.NET)

IsInfo Method (.NET)

IsPass Method (.NET)

IsSuppress Method (.NET)

IsWarn Method (.NET)

About the RuleEngineResult Class

About the RuleEngine Class

About Rules Enforcement Technology (RET)