| title | ToggleSetting Class | |||
|---|---|---|---|---|
| description | The ToggleSetting class represents a toggle setting in the Command Palette Extensions Toolkit and can be used to define settings that can be toggled on or off. | |||
| ms.date | 2/26/2025 | |||
| ms.topic | reference | |||
| no-loc |
|
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.
| 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. |
| 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. |