Documentation
Table of Contents

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

id DocumentId

The document being edited; its name must match the document's name.

current string

The running text, or null for a new document. A running text that does not load counts as one with no rules.

proposed string

The proposed text.

ct CancellationToken

Cancels the assessment.

Returns

ValueTask<EditImpact>

The impact.

Exceptions

ArgumentNullException

proposed is null.

ArgumentException

id is not a document this validator handles.