Anvil
Anvil.Services.ObjectStorage Class Reference

Public Member Functions

bool ContainsFloat (string prefix, string key)
 Gets if the specified prefix + key combination has a float value assigned. More...
 
bool ContainsInt (string prefix, string key)
 Gets if the specified prefix + key combination has an integer value assigned. More...
 
bool ContainsString (string prefix, string key)
 Gets if the specified prefix + key combination has a string value assigned. More...
 
float? GetFloat (string prefix, string key)
 Gets the stored float with the specified key. More...
 
int? GetInt (string prefix, string key)
 Gets the stored integer with the specified key. More...
 
string? GetString (string prefix, string key)
 Gets the stored string with the specified key. More...
 
bool Remove (string prefix, string key)
 Removes an More...
 
void Set (string prefix, string key, float value, bool persist=false)
 
void Set (string prefix, string key, int value, bool persist=false)
 Stores the specified value using the specified unique key. More...
 
void Set (string prefix, string key, string value, bool persist=false)
 

Member Function Documentation

◆ ContainsFloat()

bool Anvil.Services.ObjectStorage.ContainsFloat ( string  prefix,
string  key 
)
inline

Gets if the specified prefix + key combination has a float value assigned.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
True if a value exists, otherwise false.

◆ ContainsInt()

bool Anvil.Services.ObjectStorage.ContainsInt ( string  prefix,
string  key 
)
inline

Gets if the specified prefix + key combination has an integer value assigned.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
True if a value exists, otherwise false.

◆ ContainsString()

bool Anvil.Services.ObjectStorage.ContainsString ( string  prefix,
string  key 
)
inline

Gets if the specified prefix + key combination has a string value assigned.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
True if a value exists, otherwise false.

◆ GetFloat()

float? Anvil.Services.ObjectStorage.GetFloat ( string  prefix,
string  key 
)
inline

Gets the stored float with the specified key.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
The float value stored with the specified key, otherwise null if the key has no value populated.

◆ GetInt()

int? Anvil.Services.ObjectStorage.GetInt ( string  prefix,
string  key 
)
inline

Gets the stored integer with the specified key.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
The integer value stored with the specified key, otherwise null if the key has no value populated.

◆ GetString()

string? Anvil.Services.ObjectStorage.GetString ( string  prefix,
string  key 
)
inline

Gets the stored string with the specified key.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
Returns
The string stored with the specified key, otherwise null if the key has no value populated.

◆ Remove()

bool Anvil.Services.ObjectStorage.Remove ( string  prefix,
string  key 
)
inline

Removes an

Parameters
prefixThe storage prefix/group containing the key to be removed.
keyThe storage key to be removed.
Returns
True if an entry was removed, otherwise false.

◆ Set()

void Anvil.Services.ObjectStorage.Set ( string  prefix,
string  key,
int  value,
bool  persist = false 
)
inline

Stores the specified value using the specified unique key.

Parameters
prefixThe storage prefix/group.
keyThe storage key.
valueThe value to store.
persistSet to true to include this value when the object is serialized.

The documentation for this class was generated from the following file: