You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ public class OrderService
75
75
## How It Works
76
76
-**Roslyn Source Generator** scans for commands and queries marked with `[GenerateDispatcher]`.
77
77
- The dispatcher implementation is generated **at compile time**, avoiding reflection-based dependency resolution.
78
-
-The generated dispatcher is **automatically registered in DI**, allowing easy injection and usage.
78
+
-Aside from the generated dispatcher, the generator also creates an extension method for `IServiceCollection` called `RegisterCommandDispatcherAndHandlers` that ensures necessary dependencies **are automatically registered in DI**, allowing easy injection and usage. Simply call `services.RegisterCommandDispatcherAndHandlers()` during your DI setup.
0 commit comments