ISettingsReader.SubscribeToChanges Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public IDisposable SubscribeToChanges (Action<Microsoft.VisualStudio.Utilities.UnifiedSettings.SettingsUpdate> handler, params string[] monikerPatterns);
abstract member SubscribeToChanges : Action<Microsoft.VisualStudio.Utilities.UnifiedSettings.SettingsUpdate> * string[] -> IDisposable
Public Function SubscribeToChanges (handler As Action(Of SettingsUpdate), ParamArray monikerPatterns As String()) As IDisposable
Parameters
- handler
- Action<SettingsUpdate>
The callback to be invoked when settings change.
- monikerPatterns
- String[]
A collection of setting monikers (like "environment.general.visualExperience.colorTheme") or prefixes + wildcard (like "environment.general.*") representing the setting(s) that will trigger this callback.
Returns
An object that will unregister this handler when disposed.
Exceptions
Thrown if handler
or monikerPatterns
is null.
Thrown if monikerPatterns
is empty.