Search Results for

    Show / Hide Table of Contents

    Class CollectionExtensions

    Extension methods for AIDevKit types.

    Inheritance
    object
    CollectionExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public static class CollectionExtensions

    Methods

    | Edit this page View Source

    Add(Message, Object)

    Declaration
    public static UserMessage Add(this Message m, Object @object)
    Parameters
    Type Name Description
    Message m
    Object object
    Returns
    Type Description
    UserMessage
    | Edit this page View Source

    AddAttachment(Message, IFile)

    Declaration
    public static UserMessage AddAttachment(this Message m, IFile file)
    Parameters
    Type Name Description
    Message m
    IFile file
    Returns
    Type Description
    UserMessage
    | Edit this page View Source

    AddAttachments(Message, IEnumerable<IFile>)

    Declaration
    public static UserMessage AddAttachments(this Message m, IEnumerable<IFile> files)
    Parameters
    Type Name Description
    Message m
    IEnumerable<IFile> files
    Returns
    Type Description
    UserMessage
    | Edit this page View Source

    AddRange(Message, IEnumerable<Object>)

    Declaration
    public static UserMessage AddRange(this Message m, IEnumerable<Object> objects)
    Parameters
    Type Name Description
    Message m
    IEnumerable<Object> objects
    Returns
    Type Description
    UserMessage
    | Edit this page View Source

    FirstOrDefault<T>(Generated<T>)

    Gets the first item from the generated collection, or default if empty.

    Declaration
    public static T FirstOrDefault<T>(this Generated<T> g) where T : class
    Parameters
    Type Name Description
    Generated<T> g

    The generated collection

    Returns
    Type Description
    T

    The first item or default value

    Type Parameters
    Name Description
    T

    The type of items in the collection

    | Edit this page View Source

    IsNotNullOrEmpty<T>(Generated<T>)

    Determines whether the generated collection is not null and not empty.

    Declaration
    public static bool IsNotNullOrEmpty<T>(this Generated<T> g) where T : class
    Parameters
    Type Name Description
    Generated<T> g

    The generated collection to check

    Returns
    Type Description
    bool

    True if the collection has items, false otherwise

    Type Parameters
    Name Description
    T

    The type of items in the collection

    | Edit this page View Source

    IsNullOrEmpty<T>(Generated<T>)

    Determines whether the generated collection is null or empty.

    Declaration
    public static bool IsNullOrEmpty<T>(this Generated<T> g) where T : class
    Parameters
    Type Name Description
    Generated<T> g

    The generated collection to check

    Returns
    Type Description
    bool

    True if the collection is null or empty, false otherwise

    Type Parameters
    Name Description
    T

    The type of items in the collection

    | Edit this page View Source

    ToArray(TextAsset)

    Converts a comma-separated TextAsset to an array of strings.

    Declaration
    public static string[] ToArray(this TextAsset textAsset)
    Parameters
    Type Name Description
    TextAsset textAsset

    The TextAsset containing comma-separated values

    Returns
    Type Description
    string[]

    An array of trimmed string values, or null if the asset is empty

    | Edit this page View Source

    ToStringList(TextAsset)

    Converts a comma-separated TextAsset to a list of strings.

    Declaration
    public static List<string> ToStringList(this TextAsset textAsset)
    Parameters
    Type Name Description
    TextAsset textAsset

    The TextAsset containing comma-separated values

    Returns
    Type Description
    List<string>

    A list of trimmed string values, or null if the asset is empty

    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation