Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Definition
Namespace: Microsoft.CommandPalette.Extensions.Toolkit
Implements ISettingsForm
The Setting<T> class represents a setting in the command palette extension. It contains properties and methods to define and manage settings, including their keys, values, labels, descriptions, and error messages. This class is used to create settings that can be accessed and modified by the command palette extension.
Constructors
| Constructor | Description |
|---|---|
| Setting() | The default constructor for the Setting class. |
| Setting(String, T) | The constructor for the Setting class that takes a key and a value. |
| Setting(String, String, String, T) | The constructor for the Setting class that takes a key, label, description, and value. |
Properties
| Property | Type | Description |
|---|---|---|
| Description | String | Gets or sets the description of the setting. |
| ErrorMessage | String | Gets or sets the text of the error message. |
| IsRequired | Boolean | Gets or sets whether the setting is required. |
| Key | String | Gets the key of the setting. |
| Label | String | Gets or sets the label of the setting. |
| Value | T | Gets or sets the value of the setting. |
Methods
| Method | Description |
|---|---|
| ToDataIdentifier() | The ToDataIdentifier method converts the setting to a data identifier. |
| ToDictionary() | The ToDictionary method converts the setting to a dictionary. |
| ToForm() | The ToForm method converts the setting to a form. |
| ToState() | The ToState method converts the setting to a state. |
| Update(JsonObject) | The Update method updates the setting with the specified JSON object. |
Windows developer