Delen via


ISettingsWriter Interface

Definition

Changes made via this API don't take effect until RequestCommit(String) is called. At that point, they may be immediately approved/rejected or they may need to wait for user approval. The scope at which the changes are persisted may be user-determined. RequestCommit(String) can be called multiple times.

public interface ISettingsWriter : Microsoft.VisualStudio.Utilities.UnifiedSettings.ISettingsReader
type ISettingsWriter = interface
    interface ISettingsReader
Public Interface ISettingsWriter
Implements ISettingsReader
Implements

Methods

Commit(String)
Obsolete.

This method is deprecated. Use RequestCommit(String) instead. Commits all queued changes. This may require user approval to complete. In that case, this method will return immediately and the commit will complete later once the user has approved it.

EnqueueArrayChange<T>(String, IReadOnlyList<T>)

Enqueues a change to the value of an array setting. The target scope may be selected by the user during the approval process. Validation will be performed unless the setting is not registered.

EnqueueChange<T>(String, T, SettingWriteOptions)

Enqueues a change to the value of a setting. The target scope may be selected by the user during the approval process. Validation will be performed unless the setting is not registered.

EnqueueChange<T>(String, T)

Enqueues a change to the value of a setting. The target scope may be selected by the user during the approval process. Validation will be performed unless the setting is not registered. This is equivalent to calling EnqueueChange<T>(String, T, SettingWriteOptions) with None.

GetArray<T>(String, SettingReadOptions)

Gets an array setting's effective value, or the default value if it isn't customized.

(Inherited from ISettingsReader)
GetArrayOrThrow<T>(String)

Gets an array setting. If there is no persisted value, the persisted value is invalid, or the persisted value can't be converted to an array of T, returns the default value.

(Inherited from ISettingsReader)
GetValue(String, Type, SettingReadOptions)

Gets a non-array setting's effective value, or the default value if it isn't customized.

(Inherited from ISettingsReader)
GetValue<T>(String, SettingReadOptions)

Gets a non-array setting's effective value, or the default value if it isn't customized.

(Inherited from ISettingsReader)
GetValueOrThrow(String, Type)

Gets a non-array setting. If there is no persisted value, the persisted value is invalid, or the persisted value can't be converted to targetType, returns the default value.

(Inherited from ISettingsReader)
GetValueOrThrow<T>(String)

Gets a non-array setting. If there is no persisted value, the persisted value is invalid, or the persisted value can't be converted to T, returns the default value.

(Inherited from ISettingsReader)
RequestCommit(String)

Requests a commit of all queued changes. This may require user approval to complete. In that case, this method will return immediately and the commit will complete later once the user has approved it. Changes will be applied in the scope selected by the user.

SubscribeToChanges(Action<SettingsUpdate>, String[])

Registers a callback to be invoked when settings' effective values change. Note that a setting can change without affecting its effective value if the setting is overridden in a higher-priority scope -- e.g. if a setting change is applied to "user" scope (lower priority) but the same setting is also customized at "workspace" scope (higher priority), the change will not affect the effective value.

(Inherited from ISettingsReader)

Applies to