Interface IPoisonDetectionRule
Interface for custom poison detection rules.
public interface IPoisonDetectionRule
- Extension Methods
Properties
Name
Gets the name of the rule.
string Name { get; }
Property Value
- string
The unique identifier of the poison detection rule.
Methods
GetConfidence(object, Exception, object)
Gets the confidence level of the detection (0-1).
double GetConfidence(object message, Exception exception, object history)
Parameters
messageobjectThe message to check.
exceptionExceptionThe exception that occurred, if any.
historyobjectThe message failure history.
Returns
- double
The confidence level between 0 and 1.
IsPoison(object, Exception, object)
Determines if a message is poison based on this rule.
bool IsPoison(object message, Exception exception, object history)
Parameters
messageobjectThe message to check.
exceptionExceptionThe exception that occurred, if any.
historyobjectThe message failure history.
Returns
- bool
True if the message is poison; otherwise, false.