Skip to main content

DelegateCollection <Delegate>

Defines a collection type that contains zero or more instances of the given generic delegate type.

Index

Constructors

constructor

Methods

add

  • add(delegate: Delegate): void
  • Adds the given argument as a delegate.


    Parameters

    • delegate: Delegate

      Delegate to add to the collection.

    Returns void

call

  • call<ResultType>(block: (delegate: Delegate) => ResultType): ResultType[]
  • Performs the given block for each delegate within the collection, coalescing the results into the returned array. @param: block Block to invoke for each delegate in the collection.


    Type parameters

    • ResultType

    Parameters

    • block: (delegate: Delegate) => ResultType

      Returns ResultType[]

      Resulting array of returned values from the delegates in the collection.

    invoke

    • invoke(block: (delegate: Delegate) => void): void
    • Performs the given block against each delegate within the collection.


      Parameters

      • block: (delegate: Delegate) => void

        Block to invoke for each delegate instance.

        Returns void

      remove

      • remove(delegate: Delegate): void
      • Removes the given argument from the collection of delegates.


        Parameters

        • delegate: Delegate

          Delegate to remove from the collection.

        Returns void

      Page Options