InvocationMiddleware Delegasikan

Definisi

Delegasi yang digunakan untuk menambahkan middleware pemanggilan handler perintah.

public delegate System::Threading::Tasks::Task ^ InvocationMiddleware(InvocationContext ^ context, Func<InvocationContext ^, Task ^> ^ next);
public delegate System.Threading.Tasks.Task InvocationMiddleware(InvocationContext context, Func<InvocationContext,Task> next);
type InvocationMiddleware = delegate of InvocationContext * Func<InvocationContext, Task> -> Task
Public Delegate Function InvocationMiddleware(context As InvocationContext, next As Func(Of InvocationContext, Task)) As Task 

Parameter

context
InvocationContext

Konteks untuk pemanggilan saat ini, yang akan diteruskan ke setiap middleware dan kemudian ke handler perintah, kecuali jika middleware mengaitkannya.

next
Func<InvocationContext,Task>

Sebuah kelanjutan. Meneruskan yang masuk InvocationContext ke dalamnya akan menjalankan middleware berikutnya di alur dan, di akhir alur, handler perintah. Middleware dapat mempersingkat pemanggilan dengan tidak memanggil kelanjutan ini.

Tampilkan Nilai

Berlaku untuk