Search Results for

    Show / Hide Table of Contents

    Class StringOr<T>

    Holds either a single string or an object of type T without boxing.

    Inheritance
    object
    StringOr<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 StringOr<T> : INullable
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    StringOr(string)

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

    StringOr(T)

    Declaration
    public StringOr(T objectValue)
    Parameters
    Type Name Description
    T objectValue

    Properties

    | 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

    IsObject

    Declaration
    public bool IsObject { 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

    Length

    If string ??its length. If object implements IEnumerable ??element count. Otherwise 0.

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

    ObjectValue

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

    StringValue

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

    Methods

    | Edit this page View Source

    ToObject()

    Declaration
    public T ToObject()
    Returns
    Type Description
    T
    | 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 StringOr<T>(string)

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

    implicit operator StringOr<T>(T)

    Declaration
    public static implicit operator StringOr<T>(T objectValue)
    Parameters
    Type Name Description
    T objectValue
    Returns
    Type Description
    StringOr<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)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation