I'm guessing there is no way to do something like the following with Autofac, to ctor inject an enumerable collection of open generic types? The various Handle types have dependencies, otherwise I would just dynamically build those up.
class EventOne : IEvent {...}
class EventTwo : IEvent {...}
class EventThree : IEvent {...}
interface IHandleEvent<T> where T : IEvent {...}
class HandleEventOne : IHandleEvent<EventOne> {...}
class HandleEventTwo : IHandleEvent<EventTwo> {...}
class HandleEventThree : IHandleEvent<EventThree> {...}
builder.RegisterAssemblyTypes(myAssembies).AsClosedTypesOf(typeof(IHandleEvent<>));
builder.RegisterType<AService>().As<IAService>();
class AService : IAService
{
public AService(IEnumerable<IHandleEvent<IEvent>> handles)
{...}
}