question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggested Extensions

See original GitHub issue

Would it be possible to add a few Extensions allowing the sentence structure to be inverted when using MediatR?

Instead of doing this:

mediator.Send(request);

mediator.Send(new Request()
{
    Message = "Message"
});

handler.Handle(new Request()
{
    Message = "Message"
});

Do this:

request.Send(mediator);

new Request()
{
     Message = "Message"
}.Send(mediator);

new Request()
{
     Message = "Message"
}.Send(handler); 

Extensions for Send and Publish: https://gist.github.com/FuncLun/3876018345f6c6dc3b494ec0a2c6219a

Those extensions use Send/Publish to IRequestHandler/INotificationHandler, allowing you to pass either a mediator or a handler.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
no1melmancommented, Sep 16, 2018

This feels a little obscure and it is weird that you would attach the send action to a DTO class. I’m not saying you can’t have those extensions in your own project - I just feel they would be out of place in the MediatR library

0reactions
jbogardcommented, May 2, 2019

Closing until C# gets a pipe forward operator

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing Extensions in Visual Studio Code
The list of recommended extensions based on your workspace; The list of globally popular extensions. You can sort the extension list by Install...
Read more >
20 Best VSCode Extensions to Improve Your Productivity
Extensions to your IDE are invaluable to speed up your work. Here are 20 VSCode extensions to make you a more productive developer...
Read more >
20 Best VS Code Extensions For 2023
In this blog, let us discuss how VS Code extensions make a developer's job much easier and faster and dive into some of...
Read more >
Recommended Extensions program | Firefox Help
Recommended extensions differ from other extensions that are regularly reviewed by Firefox staff in that they are curated extensions that meet the highest ......
Read more >
The 30 Best VSCode Extensions You Need to Use in 2023
Whether a new developer or a 10x pro, we've found the 30 best VSCode extensions in 2023 to maximize productivity and efficiency with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found