Documentation
Table of Contents

Class ApplyingEditWriter

Namespace
IntentSharp.Edits
Assembly
IntentSharp.dll

The edit writer a client uses unless you wrap it: it saves a checked document edit as a new version and makes that version run, so edits the library originates take effect by default. Wrap it with WithEditWriter(Func<IEditWriter, IEditWriter>) to hold, keep or decline edits instead.

public sealed class ApplyingEditWriter : IEditWriter
Inheritance
object
ApplyingEditWriter
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Constructors

ApplyingEditWriter(IDocumentStore)

Creates a writer that saves edits to store.

Properties

MappingStore

The store a mapping edit replaces a revision in. WithMappingStore(IMappingStore, string) sets it on the client's writer, so a replacement of a compiled mapping is stored where the client keeps its mappings. A writer you construct yourself sets it before the first mapping edit. Null, the default, refuses every mapping edit. The setter is not an init, because the builder sets it after the writer exists.

Methods

SubmitAsync(ProposedEdit, CancellationToken)

Saves a document edit as a new running version, based on BasedOn, with the edit's author and reason, and returns Applied with that version. Returns Conflict when another version became running since the edit was based on it, and Refused, storing nothing, for an edit whose Impact does not load cleanly (an edit the library did not check, or one its validators failed), an edit the store refuses to save (its SaveAsync(DocumentSave, CancellationToken) throws ArgumentException, as a FolderDocumentStore does for a text larger than its MaxDocumentBytes or a path it does not write; the reason is the store's message), a mapping edit while no mapping store is configured, or a kind it does not apply. A mapping edit replaces the revision it is based on in MappingStore: Applied means the store holds the edit's row as the active revision; Conflict means that revision was no longer active, or another writer replaced it first, and nothing was stored; Refused means the edit's kind or shapes are not that revision's, so the row would be refused on every read, and nothing was stored.