Share via


WorkspaceSettingsExtensions.EnsurePropertyGroup Method

Definition

A variant of "Scope", used during "Save" it will create and add a collection property with "key" name if it does not already exists. Used when caller is not interested by the current state, but just want to get the current value to use.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Workspace::Settings::IWorkspaceSettingsSourceWriter ^ EnsurePropertyGroup(Microsoft::VisualStudio::Workspace::Settings::IWorkspaceSettingsSourceWriter ^ settings, System::String ^ key);
public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Workspace::Settings::IWorkspaceSettingsSourceWriter ^ EnsurePropertyGroup(Microsoft::VisualStudio::Workspace::Settings::IWorkspaceSettingsSourceWriter ^ settings, Platform::String ^ key);
public static Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter EnsurePropertyGroup (this Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter settings, string key);
public static Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter? EnsurePropertyGroup (this Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter settings, string key);
static member EnsurePropertyGroup : Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter * string -> Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettingsSourceWriter
<Extension()>
Public Function EnsurePropertyGroup (settings As IWorkspaceSettingsSourceWriter, key As String) As IWorkspaceSettingsSourceWriter

Parameters

settings
IWorkspaceSettingsSourceWriter

the settings instance

key
String

the name of the property

Returns

the current value as persisted in the settings or empty

Applies to