WorkspaceSettingsExtensions.EnsurePropertyGroup 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.
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