Class ServerDictionary
Set of 16 key-value pairs that can be attached to an object.
This can be useful for storing additional information about the object in a structured format,
and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters.
Values are strings with a maximum length of 512 characters, booleans, or numbers.
Inheritance
ServerDictionary
Assembly: Glitch9.AIDevKit.dll
Syntax
[JsonConverter(typeof(ServerDictionaryJsonConverter))]
public sealed class ServerDictionary
Constructors
|
Edit this page
View Source
ServerDictionary(int, int, int)
Declaration
public ServerDictionary(int maxKeys = 16, int maxKeyLength = 64, int maxValueLength = 512)
Parameters
| Type |
Name |
Description |
| int |
maxKeys |
|
| int |
maxKeyLength |
|
| int |
maxValueLength |
|
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
Methods
|
Edit this page
View Source
Clear()
Declaration
|
Edit this page
View Source
ContainsKey(string)
Declaration
public bool ContainsKey(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
|
Edit this page
View Source
Get<T>(string)
Declaration
public T Get<T>(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
Type Parameters
|
Edit this page
View Source
IsNullOrEmpty()
Declaration
public bool IsNullOrEmpty()
Returns
|
Edit this page
View Source
Remove(string)
Declaration
public bool Remove(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
|
Edit this page
View Source
Set<T>(string, T)
Declaration
public void Set<T>(string key, T value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| T |
value |
|
Type Parameters
|
Edit this page
View Source
ToDictionary()
Declaration
public Dictionary<string, string> ToDictionary()
Returns
|
Edit this page
View Source
TryAdd<T>(string, T)
Declaration
public bool TryAdd<T>(string key, T value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| T |
value |
|
Returns
Type Parameters
|
Edit this page
View Source
TryGetValue<T>(string, out T)
Declaration
public bool TryGetValue<T>(string key, out T value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| T |
value |
|
Returns
Type Parameters
Extension Methods