Questions tagged [membus]

Pure In-Memory Publish/Subscribe .NET Bus

In-memory publish-subscribe bus that can be used with .NET 4.0 onwards and contains the following features:

  • pluggable subscription and publishing pipeline,
  • first-class support of Observables,
  • contravariant messaging
  • resolution of handlers through pluggable IOC.
  • Configuration API to specify conventions on how messages should be published and subscribed to.

Some examples and explanations can be found at the maintainer's website. The library is available as Nuget package and the source code can be found at github.

3 questions
7
votes
4 answers

Unit testing object whose lifetime scope is handled by IoC container

I am using Microsoft Unit Test and have the following: public class AccountCommandHandlers : Handler, Handler { public bool CreateAccountCommandWasCalled = false; public bool…
morleyc
  • 2,169
  • 10
  • 48
  • 108
6
votes
2 answers

multiple types for SetHandlerInterface() with membus and ioc container

Going over demo CQRS code here the command and event handlers are wired up separately as below: public interface CommandHandler { void Handle(T command); } public interface EventHandler { void Handle(T @event); } bus =…
morleyc
  • 2,169
  • 10
  • 48
  • 108
2
votes
1 answer

Membus and Simple Injector - Wiring Command Handlers automatically by interface

I have seen the IoC feature in Membus that i have tried to hookup to Simple Injector IEnumerable IocAdapter.GetAllInstances(Type desiredType) { var found = SimpleInjectorContainer.GetAllInstances(desiredType); return found; } The idea is…
morleyc
  • 2,169
  • 10
  • 48
  • 108