Skip to content

Commit 6e30f74

Browse files
committed
Update invoke section
1 parent e59f520 commit 6e30f74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,14 @@ public class GetUserHandler
121121
## ➡️ Invocation API Overview
122122

123123
```csharp
124-
// With response
124+
// Async with response
125125
var user = await mediator.InvokeAsync<User>(new GetUser(id));
126126

127-
// Without response
127+
// Async without response
128128
await mediator.InvokeAsync(new Ping("Hi"));
129+
130+
// Sync with response (all handlers and middleware must be sync)
131+
var reply = mediator.Invoke<string>(new Ping("Hello"));
129132
```
130133

131134
## 🔄 Tuple Returns & Cascading Messages

0 commit comments

Comments
 (0)