ISettingsList.AddToFrontAsync(String, Object, Object) Method
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.
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);
abstract member AddToFrontAsync : string * obj * obj -> System.Threading.Tasks.Task
Public Function AddToFrontAsync (key As String, value As Object, Optional state As Object = Nothing) As Task
- 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 Task.
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.
This method is safe to access from any thread.