LuckyPennySoftware/MediatR ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple C# library for my .NET projects that helps decouple my code. The main idea is to create an in-process messaging system. Instead of having my API controllers or services call business logic directly, I want to send a "request" object and have a dedicated handler class process it and return a response. This should work for both queries that return data and commands that perform an action.
It should also support "fire-and-forget" style notifications, where I can publish an event and have multiple different handlers react to it independently. Everything should be asynchronous and work well with async/await. Make it easy to integrate into an ASP.NET Core application, so I can just add it to my services and it will automatically discover all my request and notification handlers from my assemblies. It should be lightweight with no other dependencies.
Are you gonna build this?
make sure you review the code using coderabbit