Show / Hide Table of Contents

    Class VariantBase

    Used internally to implement Variant types.
    Inheritance
    System.Object
    VariantBase
    Variant<T1>
    Variant<T1, T2>
    Variant<T1, T2, T3>
    Variant<T1, T2, T3, T4>
    Variant<T1, T2, T3, T4, T5>
    Variant<T1, T2, T3, T4, T5, T6>
    Variant<T1, T2, T3, T4, T5, T6, T7>
    Variant<T1, T2, T3, T4, T5, T6, T7, T8>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Maki.Details
    Assembly: Maki.dll
    Syntax
    public abstract class VariantBase

    Properties

    | Improve this Doc View Source

    Index

    Gets the 0-based index of the type inhabiting the variant.
    Declaration
    public byte Index { get; }
    Property Value
    Type Description
    System.Byte

    Methods

    | Improve this Doc View Source

    Equals(Object)

    Determines whether the specified object is equal to the current object.
    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj The object to compare with the current object.
    Returns
    Type Description
    System.Boolean True if the objects are equal.
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    Get()

    Gets the item inhabiting the variant as an object.
    Declaration
    public object Get()
    Returns
    Type Description
    System.Object Item inhabiting the variant as an object.
    | Improve this Doc View Source

    Get<T>()

    Gets the item inhabiting the variant as a T.
    Declaration
    public T Get<T>()
    Returns
    Type Description
    T Item inhabiting the variant as the given type .
    Type Parameters
    Name Description
    T Should be one of the variant's supplied types.
    Exceptions
    Type Condition
    System.InvalidCastException Thrown if the item inhabiting the variant is not of type
    | Improve this Doc View Source

    GetHashCode()

    Returns the hash code for this instance.
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32 Hash code.
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    Is<T>()

    Returns a value that indicates whether the variant is inhabited by an item of type T.
    Declaration
    public bool Is<T>()
    Returns
    Type Description
    System.Boolean True if the variant is inhabited by an item of type , false otherwise.
    Type Parameters
    Name Description
    T Should be one of the variant's supplied types.
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX