Edit

Share via


ISettingsStorageHelper<TKey> Interface

Definition

Service interface used to store data using key value pairs.

public interface ISettingsStorageHelper<in TKey>
type ISettingsStorageHelper<'Key> = interface
Public Interface ISettingsStorageHelper(Of In TKey)

Type Parameters

TKey

The type of keys to use for accessing values.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Derived

Methods

Clear()

Clear all keys and values from the settings store.

Save<TValue>(TKey, TValue)

Saves a single item by its key.

TryDelete(TKey)

Deletes a single item by its key.

TryRead<TValue>(TKey, TValue)

Retrieves a single item by its key.

Extension Methods

Delete<TKey>(ISettingsStorageHelper<TKey>, TKey)

Deletes a key from storage.

GetValueOrDefault<TKey,TValue>(ISettingsStorageHelper<TKey>, TKey, TValue)

Attempts to read the provided key and return the value. If the key is not found, the fallback value will be used instead.

Read<TKey,TValue>(ISettingsStorageHelper<TKey>, TKey)

Read the key in the storage helper instance and get the value.

Applies to