Documentation
Table of Contents

Method EvaluateAsync

Namespace
IntentSharp.Guardrails
Assembly
IntentSharp.dll

EvaluateAsync(SubjectName, JsonNode?, JsonNode?, GuardrailKindContext, CancellationToken)

Checks value against the rule's argument.

ValueTask<GuardrailKindResult> EvaluateAsync(SubjectName subject, JsonNode? value, JsonNode? settings, GuardrailKindContext context, CancellationToken ct = default)

Parameters

subject SubjectName

The subject being checked, for messages.

value JsonNode

The subject's value.

settings JsonNode

The rule's argument as written.

context GuardrailKindContext

What the check knows about the operation: the checkpoint, the resolved settings and the described entities.

ct CancellationToken

Cancels the evaluation.

Returns

ValueTask<GuardrailKindResult>

Whether the value passes, and the problems when it does not.