IExtensionSettings Interface#
Augmentation interface for extensions that expose configurable settings.
An extension implements this alongside its primary capability interface
(e.g. ILanguageKernel + IExtensionSettings). Implementing
IExtensionSettings alone is not a valid extension capability.
public interface IExtensionSettings
Properties#
SettingDefinitions Property#
Gets the static list of setting definitions declared by this extension. Each definition describes a single configurable value with its type, default, and constraints.
System.Collections.Generic.IReadOnlyList<Verso.Abstractions.SettingDefinition> SettingDefinitions { get; }
Property Value#
System.Collections.Generic.IReadOnlyList<SettingDefinition>
Methods#
ApplySettingsAsync(IReadOnlyDictionary<string,object>) Method#
Batch-restores settings from persisted values (e.g. when opening a .verso file). Called by the engine during extension initialization with the values stored in the file. Unknown setting names should be silently ignored for forward compatibility.
System.Threading.Tasks.Task ApplySettingsAsync(System.Collections.Generic.IReadOnlyDictionary<string,object?> values);
Parameters#
values System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object>
A dictionary of setting name to persisted value.
Returns#
GetSettingValues() Method#
Gets the current values of all settings as a name-to-value dictionary. Only includes settings whose current value differs from the default, or all settings if the extension prefers to return the full set.
System.Collections.Generic.IReadOnlyDictionary<string,object?> GetSettingValues();
Returns#
System.Collections.Generic.IReadOnlyDictionary<System.String,System.Object>
OnSettingChangedAsync(string, object) Method#
Called when a single setting is changed interactively from the UI. The extension should validate and apply the new value.
System.Threading.Tasks.Task OnSettingChangedAsync(string name, object? value);
Parameters#
name System.String
The setting name.
value System.Object
The new value.