Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 779 Bytes

IoC container

EventFlow has a custom minimal IoC container implementation, but before using EventFlow in a production environment, its recommended to change to Autofac or provide another.

Autofac

EventFlow provides the NuGet package EventFlow.Autofac that allows you to set the internal ContainerBuilder used during EventFlow initialization.

Pass the ContainerBuilder to EventFlow and call CreateContainer() when configuration is done to create the container.

var containerBuilder = new ContainerBuilder();

var container = EventFlowOptions.With
  .UseAutofacContainerBuilder(containerBuilder) // Must be the first line!
  ...
  .CreateContainer();