Method AssessAsync
- Namespace
- IntentSharp.Documents
- Assembly
- IntentSharp.dll
AssessAsync(DocumentId, string?, string, CancellationToken)
Loads proposed as a default intent document and compares its output rules with
current's. A proposed text that does not load gives an impact that does not load cleanly, with
one problem per mistake and its line; one that loads gives one change per output rule that differs, named
rules.<path> (for example rules.properties.explanation.maxLength) with the rule's value before
and after.
public ValueTask<EditImpact> AssessAsync(DocumentId id, string? current, string proposed, CancellationToken ct = default)
Parameters
idDocumentIdThe document being edited; its name must match the document's
name.currentstringThe running text, or null for a new document. A running text that does not load counts as one with no rules.
proposedstringThe proposed text.
ctCancellationTokenCancels the assessment.
Returns
- ValueTask<EditImpact>
The impact.
Exceptions
- ArgumentNullException
proposedis null.- ArgumentException
idis not a document this validator handles.