Search Results for

    Show / Hide Table of Contents

    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
    object
    ServerDictionary
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    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
    Type Description
    int

    Methods

    | Edit this page View Source

    Clear()

    Declaration
    public void Clear()
    | Edit this page View Source

    ContainsKey(string)

    Declaration
    public bool ContainsKey(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool
    | Edit this page View Source

    Get<T>(string)

    Declaration
    public T Get<T>(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    IsNullOrEmpty()

    Declaration
    public bool IsNullOrEmpty()
    Returns
    Type Description
    bool
    | Edit this page View Source

    Remove(string)

    Declaration
    public bool Remove(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool
    | 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
    Name Description
    T
    | Edit this page View Source

    ToDictionary()

    Declaration
    public Dictionary<string, string> ToDictionary()
    Returns
    Type Description
    Dictionary<string, string>
    | 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 Description
    bool
    Type Parameters
    Name Description
    T
    | 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 Description
    bool
    Type Parameters
    Name Description
    T

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation