Edit

Setting Constructors

Setting() Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the Setting class with Value property set to its default value and Key set to an empty string.

protected Setting()
    {
        Value = default;
        Key = string.Empty;
    }

Setting(String, T) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the Setting class with its Key property set to key and its Value set to defaultValue.

public Setting(string key, T defaultValue)
    {
        Key = key;
        Value = defaultValue;
    }

Parameters

key String

The key of the setting. This is a unique identifier for the setting.

defaultValue T

The default value of the setting. This is the value that will be used if no value is provided for the setting.

Setting(String, String, String, T) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the Setting class with its Key property set to key, its Value set to defaultValue, its Label set to label, and its Description set to description.

public Setting(string key, string label, string description, T defaultValue)
    {
        Key = key;
        Value = defaultValue;
        Label = label;
        Description = description;
    }

Parameters

key String

The key of the setting. This is a unique identifier for the setting.

label String

The label of the setting. This is a user-friendly name for the setting that will be displayed in the UI.

description String

The description of the setting. This is a brief explanation of what the setting does and how it should be used.

defaultValue T

The default value of the setting. This is the value that will be used if no value is provided for the setting.