Table of Contents

Interface IContentWriteService

Namespace
Quilt4Net.Toolkit.Features.Content
Assembly
Quilt4Net.Toolkit.dll

Re-assert content the server already owns — the supported way to change a key's text when changing the literal in code no longer does anything.

public interface IContentWriteService

Remarks

A key's stored value wins over the default a caller supplies, so that an administrator's edit survives a redeploy. The gap that leaves is a value that exists and is now wrong in code: the only remedies were minting a new key (Heading2, then Heading3) or hand-editing every environment. This is the path that follows from the rule rather than an exception to it.

⚠️ Deliberately not wired into startup. Nothing calls this for you, and that is the design. Every instance asserting its build's strings on boot recreates the problem it solves, and makes a rollback quietly revert tenant content. Call it from a reviewed maintenance action or a CI step, where a person decided the text should change.

Requires an API key holding content:write, and writes land at the lowest stage — a human promotes from there.

Methods

ImportAsync(IReadOnlyCollection<ContentImportItem>, CancellationToken)

Write new text for a set of keys. Returns what the server did, including any language names it did not recognise.

Task<ContentImportResult> ImportAsync(IReadOnlyCollection<ContentImportItem> items, CancellationToken cancellationToken = default)

Parameters

items IReadOnlyCollection<ContentImportItem>
cancellationToken CancellationToken

Returns

Task<ContentImportResult>

Remarks

Always check IgnoredLanguages. A name matching no configured language is skipped, not refused, so a typo otherwise returns success while the translation never appears. A CI step should fail its build on a non-empty list.