Delegate.EnumerateInvocationList<TDelegate>(TDelegate) Metoda

Definice

Získá enumerátor pro vyvolání cílů tohoto delegáta.

public:
generic <typename TDelegate>
 where TDelegate : Delegate static Delegate::InvocationListEnumerator<TDelegate> EnumerateInvocationList(TDelegate d);
public static Delegate.InvocationListEnumerator<TDelegate> EnumerateInvocationList<TDelegate>(TDelegate? d) where TDelegate : Delegate;
static member EnumerateInvocationList : 'Delegate -> Delegate.InvocationListEnumerator<'Delegate (requires 'Delegate :> Delegate)> (requires 'Delegate :> Delegate)
Public Shared Function EnumerateInvocationList(Of TDelegate As Delegate) (d As TDelegate) As Delegate.InvocationListEnumerator(Of TDelegate)

Parametry typu

TDelegate

Typ delegáta je výčtu.

Parametry

d
TDelegate

Delegát, který je výčtem.

Návraty

A Delegate.InvocationListEnumerator<TDelegate> , který se řídí vzorem IEnumerable, a proto lze použít v příkazu "foreach" jazyka C# k načtení cílů vyvolání tohoto delegáta bez přidělení. Metoda vrátí prázdný enumerátor pro null delegáta.

Poznámky

Pořadí delegátů vrácených enumerátorem je stejné pořadí, ve kterém aktuální delegát vyvolá metody, které tito delegáti představují.

Platí pro