Interface IKeyValueStorable<TKey, TValue>
key-value storage interface
Namespace: Pixiv.VroidSdk.Storage
Assembly: Pixiv.VroidSdk.dll
Syntax
public interface IKeyValueStorable<TKey, TValue>
where TValue : class
Type Parameters
Name | Description |
---|---|
TKey | Object type to get |
TValue | Object value to get |
Methods
GetObject(TKey)
Get data corresponding to specified key
Declaration
TValue GetObject(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key |
Returns
Type | Description |
---|---|
TValue | Retrieved object |
HasValue(TKey)
Deletes data stored in memory
Declaration
bool HasValue(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key to be checked |
Returns
Type | Description |
---|---|
Boolean | Returns |
RemoveKey(TKey)
Delete specified key data
Declaration
bool RemoveKey(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key to be deleted |
Returns
Type | Description |
---|---|
Boolean | Returns |
Save()
Save data stored in memory to storage
Declaration
void Save()
SetValue(TKey, TValue)
Set data to specified key
Declaration
void SetValue(TKey key, TValue value)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | Key |
TValue | value | Object to be set |