Udostępnij za pośrednictwem


ISettingsManager.SetValueAsync(String, Object, Boolean) Method

Definition

Sets the value of a property.

public:
 System::Threading::Tasks::Task ^ SetValueAsync(System::String ^ name, System::Object ^ value, bool isMachineLocal);
public System.Threading.Tasks.Task SetValueAsync (string name, object value, bool isMachineLocal);
abstract member SetValueAsync : string * obj * bool -> System.Threading.Tasks.Task
Public Function SetValueAsync (name As String, value As Object, isMachineLocal As Boolean) As Task

Parameters

name
String

The name of the setting.

value
Object

An object which will be serialized and persisted as the new value.

isMachineLocal
Boolean

True if the value is machine-local, otherwise false.

Returns

Returns Task.

Exceptions

Thrown when name is null.

Thrown when name is empty.

Thrown when the given object cannot be serialized.

Thrown when the value cannot be persisted to the private store (for example, because the disk is full).

Thrown when the serialized object exceeds the maximum allowed size.

Thrown when name exceeds the maximum allowed length.

Remarks

This method is safe to access from any thread.

Applies to