Interface IDocumentValidator
- Namespace
- IntentSharp.Documents
- Assembly
- IntentSharp.dll
Checks a proposed version of one kind of document before it is stored and run: whether it loads, what it changes, and whether it widens a security item. The package that owns each kind of document (settings, the provider file, rule files, intent files) implements one and registers it with AddDocumentValidator(IDocumentValidator) or in dependency injection; the library runs every validator whose Handles(DocumentId) is true for an edited document, and refuses an edit that no validator handles.
public interface IDocumentValidator
- Extension Methods
Methods
- AssessAsync(DocumentId, string?, string, CancellationToken)
Assesses a proposed text for the document against its running text.
- Handles(DocumentId)
True when this validator checks the document
id, typically by its path or extension.