IClipboardProvider
Pluggable system-clipboard provider. The default implementation wraps the active platform (Win32 / NSPasteboard / UIPasteboard / Android ClipboardManager / navigator.clipboard / xclip-xsel-wl-paste); integrators substitute a custom provider for testing, sandboxed clipboards, or platforms outside the shipped set.
Remarks
Implementations(2)
Types that implement IClipboardProvider.
public abstract bool HasFormat(ClipboardFormat format)Reports whether the clipboard currently carries format. This is an availability probe only — implementations must answer it from cheap native presence APIs (Win32 IsClipboardFormatAvailable, NSPasteboard.types, ClipDescription MIME list, X11 TARGETS) and never transfer the payload. Use TryGetText when the payload is wanted; probing then reading doubles the OS transfer. Provider impls that don't understand a format return false regardless of OS-level state.
public abstract string GetText(ClipboardFormat format)Reads the clipboard payload for format as text. The default path decodes the format's bytes as UTF-8 — appropriate for ClipboardFormat.PlainText / ClipboardFormat.Html / ClipboardFormat.Url. Returns null when the format is not present.
public abstract bool TryGetText(ClipboardFormat format, out string text)Single-transfer read: fetches format's text payload in one OS clipboard access and reports presence and content together. Returns false (with text null or empty) when the format is absent. The paste pipeline's per-adapter read — never pair HasFormat with GetText for that.
public abstract byte[] GetData(ClipboardFormat format)Reads the clipboard payload for format as raw bytes. Use for binary formats (P2 image, RTFD) or when the consumer wants control over the text decoding. Returns null when the format is not present.
public abstract void SetItems(IReadOnlyList<ClipboardItem> items)Writes the entire items list to the clipboard in a single atomic OS-level write. Subsequent reads see all formats simultaneously and the consumer's preferred-format chain selects which one to ingest.
