Partager via


IWorkspaceSettings.GetProperty<T> Method

Definition

get a [base] settings value (property), the type and meaning of the value is defined by the caller. This override also specifies the particular settings source that provided the value. Used in cases where implied root is needed, or when doing "unification" for arrays.

public Microsoft.VisualStudio.Workspace.Settings.WorkspaceSettingsResult GetProperty<T> (string key, out T value, out Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettings originator, T defaultValue = default);
public Microsoft.VisualStudio.Workspace.Settings.WorkspaceSettingsResult GetProperty<T> (string key, out T value, out Microsoft.VisualStudio.Workspace.Settings.IWorkspaceSettings originator, T? defaultValue = default);
abstract member GetProperty : string * 'T * IWorkspaceSettings * 'T -> Microsoft.VisualStudio.Workspace.Settings.WorkspaceSettingsResult
Public Function GetProperty(Of T) (key As String, ByRef value As T, ByRef originator As IWorkspaceSettings, Optional defaultValue As T = Nothing) As WorkspaceSettingsResult

Type Parameters

T

type of the value

Parameters

key
String

the name of the property

value
T

the current value as persisted in the settings

originator
IWorkspaceSettings

the workspace settings source that is providing the value.

defaultValue
T

optional default value to use if the current value is not present or corrupted

Returns

see WorkspaceSettingsResult

Applies to