Docs · API reference · Verso.Abstractions

SettingDefinition Class#

Declares a single configurable setting exposed by an extension.

public sealed record SettingDefinition : System.IEquatable<Verso.Abstractions.SettingDefinition>

Inheritance System.Object → SettingDefinition

Implements System.IEquatable<SettingDefinition>

Constructors#

SettingDefinition(string, string, string, SettingType, object, string, SettingConstraints, int) Constructor#

Declares a single configurable setting exposed by an extension.

public SettingDefinition(string Name, string DisplayName, string Description, Verso.Abstractions.SettingType SettingType, object? DefaultValue=null, string? Category=null, Verso.Abstractions.SettingConstraints? Constraints=null, int Order=0);

Parameters#

Name System.String

The programmatic name of the setting (e.g. "warningLevel").

DisplayName System.String

A human-readable label shown in the settings UI.

Description System.String

A longer description of what the setting controls.

SettingType SettingType

The data type of the setting value.

DefaultValue System.Object

The default value used when no override is persisted. Defaults to null.

Category System.String

An optional grouping category for organizing settings in the UI (e.g. "Compiler", "Editor").

Constraints SettingConstraints

Optional validation constraints for the setting value.

Order System.Int32

Display order within the category. Lower values appear first. Defaults to 0.

Properties#

Category Property#

An optional grouping category for organizing settings in the UI (e.g. "Compiler", "Editor").

public string? Category { get; init; }

Property Value#

System.String

Constraints Property#

Optional validation constraints for the setting value.

public Verso.Abstractions.SettingConstraints? Constraints { get; init; }

Property Value#

SettingConstraints

DefaultValue Property#

The default value used when no override is persisted. Defaults to null.

public object? DefaultValue { get; init; }

Property Value#

System.Object

Description Property#

A longer description of what the setting controls.

public string Description { get; init; }

Property Value#

System.String

DisplayName Property#

A human-readable label shown in the settings UI.

public string DisplayName { get; init; }

Property Value#

System.String

Name Property#

The programmatic name of the setting (e.g. "warningLevel").

public string Name { get; init; }

Property Value#

System.String

Order Property#

Display order within the category. Lower values appear first. Defaults to 0.

public int Order { get; init; }

Property Value#

System.Int32

SettingType Property#

The data type of the setting value.

public Verso.Abstractions.SettingType SettingType { get; init; }

Property Value#

SettingType