ISettingsManager::GetOrCreateList Method (String^, Boolean)
Visual Studio 2015
Retrieves an existing list or creates a new one if one with the specified name doesn't exist.
Assembly: Microsoft.VisualStudio.Utilities (in Microsoft.VisualStudio.Utilities.dll)
Parameters
- name
-
Type:
System::String^
The name of the setting.
- isMachineLocal
-
Type:
System::Boolean
True if the setting is machine-local, otherwise false.
The reason for a special-case "get or create" method for lists (instead of letting the client pass, say, IEnumerable to SetValue to create a list) is to avoid a race condition in which two clients are both composing lists at the same time. That would require the client to merge the two list contents (or discard one of the lists). By requiring clients to use this method instead, we ensure that lists are always live, so when one client starts adding content to the list, that content is immediately visible to all other clients.
Show: