Edit

ToggleSetting Class

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Inherits Setting<Boolean>

The ToggleSetting class represents a toggle setting in the Command Palette Extensions Toolkit. It is used to define settings that can be toggled on or off, such as enabling or disabling a feature.

Constructors

Constructor Description
ToggleSetting(String, Boolean) Creates a new instance of the ToggleSetting class with the specified name and default value.
ToggleSetting(String, String, String, Boolean) Creates a new instance of the ToggleSetting class with the specified name, description, category, and default value.

Methods

Method Description
LoadFromJson(JsonObject) Loads the toggle setting from a JSON object.
ToDictionary() Converts the toggle setting to a dictionary representation.
ToState() Converts the toggle setting to a state representation.
Update(JsonObject) Updates the toggle setting with the specified JSON object.