Search Results for

    Show / Hide Table of Contents

    Class DynamicEventDispatcher

    The class which handles delegates dynamically acting as multicast listener.

    Inheritance
    System.Object
    TypeCastObject<DynamicEventDispatcher>
    DynamicEventDispatcher
    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 DynamicEventDispatcher : TypeCastObject<DynamicEventDispatcher>, IDynamicEventDispatcher

    Constructors

    | Improve this Doc View Source

    DynamicEventDispatcher()

    Initializes a new instance of the DynamicEventDispatcher class.

    Declaration
    public DynamicEventDispatcher()
    | Improve this Doc View Source

    DynamicEventDispatcher(Dictionary<Object, List<Action>>)

    Initializes a new instance of the DynamicEventDispatcher class.

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

    The delegates to be bound.

    Properties

    | Improve this Doc View Source

    BoundDelegates

    Gets all the bound delegates.

    Declaration
    public IReadOnlyDictionary<object, List<Action>> BoundDelegates { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<System.Object, System.Collections.Generic.List<System.Action>>
    | 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>> 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>>

    The obund listener corresponding to the specified reference.

    Methods

    | Improve this Doc View Source

    Bind(Object, Action)

    Binds a listener to the event dispatcher.

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

    The listener instance.

    System.Action del

    The delegate to be bound.

    | Improve this Doc View Source

    Invoke(Object)

    Invokes the delegates from the specified listener.

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

    The listener instance.

    | Improve this Doc View Source

    InvokeAll()

    Invokes all the delegates from all the bound delegates.

    Declaration
    public virtual void InvokeAll()
    | 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(DynamicEventDispatcher, DynamicDelegate)

    Binds a listener from the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator +(DynamicEventDispatcher left, DynamicDelegate right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to bind the listener from.

    DynamicDelegate right

    The TDynamicDelegate<T> containing the listener to bind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    | Improve this Doc View Source

    Addition(DynamicEventDispatcher, DynamicEventDispatcher)

    Binds all bound listeners to a DynamicEventDispatcher to the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator +(DynamicEventDispatcher left, DynamicEventDispatcher right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to bind the listeners from.

    DynamicEventDispatcher right

    The DynamicEventDispatcher containing the listeners to bind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    | Improve this Doc View Source

    Addition(DynamicEventDispatcher, Action)

    Binds a delegate the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator +(DynamicEventDispatcher left, Action right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to bind the listener to.

    System.Action right

    The delegate to bind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    | Improve this Doc View Source

    Subtraction(DynamicEventDispatcher, DynamicDelegate)

    Unbinds a listener from the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator -(DynamicEventDispatcher left, DynamicDelegate right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to unbind the listener from.

    DynamicDelegate right

    The TDynamicDelegate<T> containing the listener to unbind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    | Improve this Doc View Source

    Subtraction(DynamicEventDispatcher, DynamicEventDispatcher)

    Unbinds all bound listeners to a DynamicEventDispatcher from the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator -(DynamicEventDispatcher left, DynamicEventDispatcher right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to unbind the listeners from.

    DynamicEventDispatcher right

    The DynamicEventDispatcher containing the listeners to unbind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    | Improve this Doc View Source

    Subtraction(DynamicEventDispatcher, Action)

    Unbinds a delegate the event dispatcher.

    Declaration
    public static DynamicEventDispatcher operator -(DynamicEventDispatcher left, Action right)
    Parameters
    Type Name Description
    DynamicEventDispatcher left

    The DynamicEventDispatcher to unbind the listener from.

    System.Action right

    The delegate to bind.

    Returns
    Type Description
    DynamicEventDispatcher

    The left-hand DynamicEventDispatcher operator.

    Implements

    IDynamicEventDispatcher

    Extension Methods

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