Search Results for

    Show / Hide Table of Contents

    Class SystemExtensions

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

    Methods

    | Edit this page View Source

    GetAllTypes(Assembly)

    Gets all types from the given assembly, even if some types fail to load. If a ReflectionTypeLoadException occurs, returns only the successfully loaded types.

    Declaration
    public static Type[] GetAllTypes(this Assembly assembly)
    Parameters
    Type Name Description
    Assembly assembly

    The assembly to retrieve types from.

    Returns
    Type Description
    Type[]

    An array of all successfully loaded types from the assembly.

    | Edit this page View Source

    GetHashCodeOrDefault(string)

    Declaration
    public static int GetHashCodeOrDefault(this string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    int
    | Edit this page View Source

    GetHashCodeOrDefault<T>(IList<T>)

    Declaration
    public static int GetHashCodeOrDefault<T>(this IList<T> list)
    Parameters
    Type Name Description
    IList<T> list
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetHashCodeOrDefault<T>(T?)

    Declaration
    public static int GetHashCodeOrDefault<T>(this T? value) where T : struct
    Parameters
    Type Name Description
    T? value
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetHashCodeOrDefault<T>(T)

    Declaration
    public static int GetHashCodeOrDefault<T>(this T value) where T : struct
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetName(object)

    Declaration
    public static string GetName(this object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    string
    | Edit this page View Source

    HasInterface<TInterface>(Type)

    Checks if the type implements the specified interface TInterface.

    Declaration
    public static bool HasInterface<TInterface>(this Type type)
    Parameters
    Type Name Description
    Type type

    The type to inspect.

    Returns
    Type Description
    bool

    True if the type implements the interface; otherwise, false.

    Type Parameters
    Name Description
    TInterface

    The interface type to check for.

    | Edit this page View Source

    IsSubclassOfRawGeneric(Type, Type)

    Determines whether the given type is a subclass of the specified generic type definition.

    Declaration
    public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic)
    Parameters
    Type Name Description
    Type toCheck

    The type to check.

    Type generic

    The generic type definition to compare against.

    Returns
    Type Description
    bool

    True if toCheck is a subclass of generic; otherwise, false.

    | Edit this page View Source

    TryDispose(IDisposable)

    Declaration
    public static void TryDispose(this IDisposable disposable)
    Parameters
    Type Name Description
    IDisposable disposable
    | Edit this page View Source

    UpcastArray<TIn, TOut>(TIn[])

    Upcasts an array of type TIn to an array of type TOut.

    Declaration
    public static TOut[] UpcastArray<TIn, TOut>(this TIn[] assets) where TIn : TOut
    Parameters
    Type Name Description
    TIn[] assets

    Array to upcast.

    Returns
    Type Description
    TOut[]

    Upcasted array, or null if input is null or empty.

    Type Parameters
    Name Description
    TIn

    Input type (must inherit from TOut).

    TOut

    Output type (base type).

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