Method SubmitAsync
- Namespace
- IntentSharp.Edits
- Assembly
- IntentSharp.dll
SubmitAsync(ProposedEdit, CancellationToken)
Checks edit with every validator that handles its document and, when it loads, passes it to
the client's edit writer, which by default saves it and makes it run. An edit whose content is larger than
MaxEditBytes allows is Refused before any validator
reads it. An edit that does not load, or whose document no validator handles, is refused too, and so is one the
store refuses to save when the default writer saves it, with the store's reason; in every case nothing is stored.
The returned outcome always carries the validators' Impact, including whether the edit
widens a security item, whatever the writer reported.
public ValueTask<EditOutcome> SubmitAsync(ProposedEdit edit, CancellationToken ct = default)
Parameters
editProposedEditThe edit. Any Impact you set is replaced by the validators' assessment.
ctCancellationTokenCancels the call.
Returns
- ValueTask<EditOutcome>
What became of the edit.
Exceptions
- ArgumentNullException
editis null.- ArgumentException
The edit has no content or author, or it is a document edit that names no document.
- InvalidOperationException
The client has no document store (call WithDocumentStore(IDocumentStore) or
AddDocumentStore), or the edit writer returned no outcome.