Skip to content
Version 2.11.0
↓ Get the launcher

IConfigSection interface

A named subset of a plugin’s configuration. Read access via Get is lock-free against the in-memory cache; writes via Set are cached and persisted to disk on Save. Supported T: primitives (Int32, Int64, Boolean, String, Single, Double), arrays of primitives, and string-keyed dictionaries of primitives. Records and complex objects are out of scope for v1 — use multiple keys instead.

public interface IConfigSection
name description
Get<T>(…) Returns the value stored at key, or defaultValue if the key is absent or the stored value can’t be coerced to T. Never throws.
RemoveByPrefix(…) Removes every key in this section whose name begins with prefix (ordinal comparison). Use this to drop a whole group of related keys at once — e.g. all per-resolution sub-keys of one entry. Does NOT write to disk — caller must invoke Save. Keys that don’t match are left untouched; never throws.
Save() Flushes the in-memory cache for this section to disk, then fires SectionChanged. Cross-process / external-edit detection is handled by the framework — plugins don’t poll the file.
SaveQuiet() Persists the section without raising SectionChanged — for echo-suppression when the writer is reacting to its own change.
Set<T>(…) Stores value at key in the in-memory cache. Does NOT write to disk — caller must invoke Save when batch of edits is complete.