Documentation
Table of Contents

Interface IEditWriter

Namespace
IntentSharp.Edits
Assembly
IntentSharp.dll

Applies an edit the library originates, such as a compiled rule companion, a model's rewrite of an intent file or a replacement of a compiled mapping, after the library has checked it. The library ships ApplyingEditWriter, which saves the edit and makes it run, so edits take effect by default. Wrap it to decide otherwise: builder.WithEditWriter(inner => new MyReviewWriter(inner)), or services.DecorateEditWriter(inner => new MyReviewWriter(inner)).

public interface IEditWriter
Extension Methods

Remarks

The library calls the writer only for an edit whose text loads and passes every validator that handles it; an edit that does not is refused and never reaches a writer. Impact holds the validators' assessment, including WidensSecurity, so a wrapper that holds only security widenings tests that one value and passes everything else to the inner writer.

A writer reports what it did, and the library trusts the report:

The library ships no review queue, approval state, approver identity, user interface or notification: holding an edit is whatever your writer does with it, and a held version is a stored version that is not running.

Methods

SubmitAsync(ProposedEdit, CancellationToken)

Applies, keeps or declines a checked edit and reports what it did.