Partager via


IStringStorage.SetAsync Method

Definition

Overloads

SetAsync(String, StringWithMachineLocalFlag)

Stores a value and machine-local flag under a specified name.

SetAsync(String, StringWithMachineLocalFlag, Action)
SetAsync(String, StringWithMachineLocalFlag, Action, CancellationToken)

Stores a value and machine-local flag under a specified name.

SetAsync(String, StringWithMachineLocalFlag)

Stores a value and machine-local flag under a specified name.

public:
 System::Threading::Tasks::Task ^ SetAsync(System::String ^ name, Microsoft::VisualStudio::Settings::StringWithMachineLocalFlag ^ value);
public System.Threading.Tasks.Task SetAsync (string name, Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag value);
abstract member SetAsync : string * Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag -> System.Threading.Tasks.Task
Public Function SetAsync (name As String, value As StringWithMachineLocalFlag) As Task

Parameters

name
String

The case-insensitive name of the setting.

value
StringWithMachineLocalFlag

The value

Returns

Returns Task.

Applies to

SetAsync(String, StringWithMachineLocalFlag, Action)

public System.Threading.Tasks.Task SetAsync (string name, Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag value, Action onBeforePropertyChanged = default);
abstract member SetAsync : string * Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag * Action -> System.Threading.Tasks.Task
Public Function SetAsync (name As String, value As StringWithMachineLocalFlag, Optional onBeforePropertyChanged As Action = Nothing) As Task

Parameters

name
String
onBeforePropertyChanged
Action

Returns

Applies to

SetAsync(String, StringWithMachineLocalFlag, Action, CancellationToken)

Stores a value and machine-local flag under a specified name.

public System.Threading.Tasks.Task SetAsync (string name, Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag value, Action onBeforePropertyChanged = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetAsync : string * Microsoft.VisualStudio.Settings.StringWithMachineLocalFlag * Action * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SetAsync (name As String, value As StringWithMachineLocalFlag, Optional onBeforePropertyChanged As Action = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

name
String

The case-insensitive name of the setting.

value
StringWithMachineLocalFlag

Setting value.

onBeforePropertyChanged
Action

Action to execute before raising property changed events.

cancellationToken
CancellationToken

Returns

Exceptions

May be thrown when name or value is null.

May be thrown when name is empty.

Applies to