Search Results for

    Show / Hide Table of Contents

    Class TypeCastObject<T>

    The interface which allows defined objects to be cast to each other.

    Inheritance
    System.Object
    TypeCastObject<T>
    EObject
    Singleton<T>
    Door
    DynamicDelegate
    DynamicEventDispatcher
    TDynamicDelegate<T>
    TDynamicEventDispatcher<T>
    Hazard
    Item
    Pickup
    Player
    Role
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features.Core
    Assembly: Exiled.API.dll
    Syntax
    public abstract class TypeCastObject<T>
    
        where T : class
    Type Parameters
    Name Description
    T

    The type of the object to cast.

    Constructors

    | Improve this Doc View Source

    TypeCastObject()

    Initializes a new instance of the TypeCastObject<T> class.

    Declaration
    protected TypeCastObject()

    Methods

    | Improve this Doc View Source

    As<TObject>()

    Declaration
    public TObject As<TObject>()
    
        where TObject : class, T
    Returns
    Type Description
    TObject
    Type Parameters
    Name Description
    TObject
    | Improve this Doc View Source

    Cast<TObject>()

    Unsafely casts the current T instance to the specified TObject type.

    Declaration
    public TObject Cast<TObject>()
    
        where TObject : class, T
    Returns
    Type Description
    TObject

    The cast T instance.

    Type Parameters
    Name Description
    TObject

    The type to which to cast the T instance.

    | Improve this Doc View Source

    Cast<TObject>(out TObject)

    Safely casts the current TObject instance to the specified TObject type.

    Declaration
    public bool Cast<TObject>(out TObject param)
    
        where TObject : class, T
    Parameters
    Type Name Description
    TObject param

    The cast object.

    Returns
    Type Description
    System.Boolean

    true if the TObject instance was successfully cast; otherwise, false.

    Type Parameters
    Name Description
    TObject

    The type to which to cast the TObject instance.

    | Improve this Doc View Source

    Is<TObject>(out TObject)

    Declaration
    public bool Is<TObject>(out TObject param)
    
        where TObject : class, T
    Parameters
    Type Name Description
    TObject param
    Returns
    Type Description
    System.Boolean
    Type Parameters
    Name Description
    TObject

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX