(no title)
UglyToad | 1 year ago
delegate Task<string> GetUserEmail(int userId);
This provides more guidance than taking in a: Func<int, Task<string>> getUserEmail
If you can annotate implementations of the delegate the tooling support becomes even nicer. Not all Funcs with the same shape have the same semantics, in my ideal C#-like language.Edit: I completely forgot the main reason which is if using a DI container it can inject the named delegate for you correctly in the constructor. Versus only being able to register a single func shape per container.
No comments yet.