ShortBus icon indicating copy to clipboard operation
ShortBus copied to clipboard

In-process mediator with low-friction API

Results 11 ShortBus issues
Sort by recently updated
recently updated
newest added

I am looking for a best practice on mocking a handler that returns a result. For instance I have a service that I would like to get under test. This...

I tried to create a simple command handler as in the example on the README but this is giving me a compilation error due to `Handle` not returning anything. ```...

Does it work with Autofac (or any other DI container)? Can it be plugged in?

The test also fails: https://github.com/mhinze/ShortBus/blob/master/ShortBus.Tests/Example/AutofacBasicExample.cs

Updated UnityDependencyResolver's GetInstances method so it will return all the instances both named and unnamed in the unity container. The original functionality would have only pulled in the named instances...

Because the UnityDependencyResolver.GetInstances() method is using the ResolveAll() method of Unity it will not return any unnamed instances that were registered in the Unity container. I'm not sure if this...

Is it good practice, or frowned upon for queries or commands to call other queries or commands? Say I want a command that adds all Foo items with a category...

e.g: ``` var n = new Notification(); _mediator.Notify(n); // succeeds _mediator.Notify((ISomeInterface) n); // fails ``` as it resolves to `Notify`, which uses `DependencyResolver.GetInstances()` which won't find the appropriate handlers. I...

Should we include a marker for event handlers?

Hi, Is there a reason for having a separate interface for async requests? Isn't a request a request and it can be handled in either a synchronous or asynchronous fashion?...