ISettingsList.AddToFrontAsync(String, Object, Object) Method

Definition

Adds a new element to the front of the list. If there is already an element with the same key in the list, that one is deleted.

public System.Threading.Tasks.Task AddToFrontAsync (string key, object value, object state = default);

Parameters

key
String

The key.

value
Object

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

state
Object

A caller-specified object that will be exposed on change events.

Returns

Returns Task.

Exceptions

Thrown when key is null.

Thrown when key 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 list exceeds the maximum allowed size.

Remarks

This method is safe to access from any thread.

Applies to