Search Results for

    Show / Hide Table of Contents

    Class TDynamicEventDispatcher<T>

    The DynamicEventDispatcher's generic version which accepts a type parameter.

    Inheritance
    System.Object
    TypeCastObject<DynamicEventDispatcher>
    TDynamicEventDispatcher<T>
    Implements
    IDynamicEventDispatcher
    Inherited Members
    TypeCastObject<DynamicEventDispatcher>.Cast<TObject>()
    TypeCastObject<DynamicEventDispatcher>.Cast<TObject>(TObject)
    TypeCastObject<DynamicEventDispatcher>.As<TObject>()
    TypeCastObject<DynamicEventDispatcher>.Is<TObject>(TObject)
    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.DynamicEvents
    Assembly: Exiled.API.dll
    Syntax
    public class TDynamicEventDispatcher<T> : TypeCastObject<DynamicEventDispatcher>, IDynamicEventDispatcher
    Type Parameters
    Name Description
    T

    The event type parameter.

    Constructors

    | Improve this Doc View Source

    TDynamicEventDispatcher()

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

    Declaration
    public TDynamicEventDispatcher()
    | Improve this Doc View Source

    TDynamicEventDispatcher(Dictionary<Object, List<Action<T>>>)

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

    Declaration
    public TDynamicEventDispatcher(Dictionary<object, List<Action<T>>> delegates)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.Object, System.Collections.Generic.List<System.Action<T>>> delegates

    The delegates to be bound.

    Properties

    | Improve this Doc View Source

    BoundDelegates

    Gets all the bound delegates.

    Declaration
    public IReadOnlyDictionary<object, List<Action<T>>> BoundDelegates { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<System.Object, System.Collections.Generic.List<System.Action<T>>>
    | Improve this Doc View Source

    Item[Object]

    This indexer allows access to bound listeners using an System.Object reference.

    Declaration
    public KeyValuePair<object, List<Action<T>>> this[object object] { get; }
    Parameters
    Type Name Description
    System.Object object

    The listener to look for.

    Property Value
    Type Description
    System.Collections.Generic.KeyValuePair<System.Object, System.Collections.Generic.List<System.Action<T>>>

    The obund listener corresponding to the specified reference.

    Methods

    | Improve this Doc View Source

    Bind(Object, Action<T>)

    Binds a listener to the event dispatcher.

    Declaration
    public virtual void Bind(object obj, Action<T> del)
    Parameters
    Type Name Description
    System.Object obj

    The listener instance.

    System.Action<T> del

    The delegate to be bound.

    | Improve this Doc View Source

    Invoke(Object, T)

    Invokes the delegates from the specified listener.

    Declaration
    public virtual void Invoke(object obj, T instance)
    Parameters
    Type Name Description
    System.Object obj

    The listener instance.

    T instance

    The .

    | Improve this Doc View Source

    InvokeAll(T)

    Invokes all the delegates from all the bound delegates.

    Declaration
    public virtual void InvokeAll(T instance)
    Parameters
    Type Name Description
    T instance

    The parameter instance.

    | Improve this Doc View Source

    Unbind(Object)

    Unbinds a listener from the event dispatcher.

    Declaration
    public virtual void Unbind(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The listener instance.

    | Improve this Doc View Source

    UnbindAll()

    Declaration
    public virtual void UnbindAll()

    Operators

    | Improve this Doc View Source

    Addition(TDynamicEventDispatcher<T>, TDynamicDelegate<T>)

    Binds a listener to the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator +(TDynamicEventDispatcher<T> left, TDynamicDelegate<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to bind the listener to.

    TDynamicDelegate<T> right

    The TDynamicDelegate<T> containing the listener to bind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    | Improve this Doc View Source

    Addition(TDynamicEventDispatcher<T>, TDynamicEventDispatcher<T>)

    Binds all bound listeners to a TDynamicEventDispatcher<T> to the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator +(TDynamicEventDispatcher<T> left, TDynamicEventDispatcher<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to bind the listeners to.

    TDynamicEventDispatcher<T> right

    The TDynamicEventDispatcher<T> containing the listeners to bind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    | Improve this Doc View Source

    Addition(TDynamicEventDispatcher<T>, Action<T>)

    Binds a delegate the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator +(TDynamicEventDispatcher<T> left, Action<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to bind the listener to.

    System.Action<T> right

    The delegate to bind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    | Improve this Doc View Source

    Subtraction(TDynamicEventDispatcher<T>, TDynamicDelegate<T>)

    Unbinds a delegate from the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator -(TDynamicEventDispatcher<T> left, TDynamicDelegate<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to unbind the delegate from.

    TDynamicDelegate<T> right

    The TDynamicDelegate<T> containing the delegate to unbind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    | Improve this Doc View Source

    Subtraction(TDynamicEventDispatcher<T>, TDynamicEventDispatcher<T>)

    Unbinds all bound listeners to a TDynamicEventDispatcher<T> from the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator -(TDynamicEventDispatcher<T> left, TDynamicEventDispatcher<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to unbind the listeners from.

    TDynamicEventDispatcher<T> right

    The TDynamicEventDispatcher<T> containing the listeners to unbind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    | Improve this Doc View Source

    Subtraction(TDynamicEventDispatcher<T>, Action<T>)

    Unbinds a delegate the event dispatcher.

    Declaration
    public static TDynamicEventDispatcher<T> operator -(TDynamicEventDispatcher<T> left, Action<T> right)
    Parameters
    Type Name Description
    TDynamicEventDispatcher<T> left

    The TDynamicEventDispatcher<T> to unbind the listener from.

    System.Action<T> right

    The delegate to unbind.

    Returns
    Type Description
    TDynamicEventDispatcher<T>

    The left-hand TDynamicEventDispatcher<T> operator.

    Implements

    IDynamicEventDispatcher

    Extension Methods

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