Search Results for

    Show / Hide Table of Contents

    Class StringOrArray<T>

    A polymorphic type that can hold either a single string or an array of T.

    Inheritance
    object
    StringOrArray<T>
    Implements
    INullable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.IO.Networking
    Assembly: Glitch9.IO.dll
    Syntax
    public class StringOrArray<T> : INullable
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    StringOrArray(string)

    Declaration
    public StringOrArray(string stringValue)
    Parameters
    Type Name Description
    string stringValue
    | Edit this page View Source

    StringOrArray(T[])

    Declaration
    public StringOrArray(T[] arrayValue)
    Parameters
    Type Name Description
    T[] arrayValue

    Properties

    | Edit this page View Source

    Array

    Declaration
    public T[] Array { get; }
    Property Value
    Type Description
    T[]
    | Edit this page View Source

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    HasValue

    Gets whether this object has a value.

    Declaration
    public bool HasValue { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsArray

    Declaration
    public bool IsArray { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsReadOnly

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsString

    Declaration
    public bool IsString { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    this[int]

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    int index
    Property Value
    Type Description
    T
    | Edit this page View Source

    Length

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    String

    Declaration
    public string String { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AddRange(IEnumerable<T>)

    Declaration
    public void AddRange(IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Operators

    | Edit this page View Source

    implicit operator StringOrArray<T>(string)

    Declaration
    public static implicit operator StringOrArray<T>(string stringValue)
    Parameters
    Type Name Description
    string stringValue
    Returns
    Type Description
    StringOrArray<T>
    | Edit this page View Source

    implicit operator StringOrArray<T>(T[])

    Declaration
    public static implicit operator StringOrArray<T>(T[] arrayValue)
    Parameters
    Type Name Description
    T[] arrayValue
    Returns
    Type Description
    StringOrArray<T>

    Implements

    INullable

    Extension Methods

    CoreLibTypeExtensions.HasValue(INullable)
    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)
    StringOrArrayExtensions.IsNotNullOrEmpty<T>(StringOrArray<T>)
    StringOrArrayExtensions.IsNullOrEmpty<T>(StringOrArray<T>)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation