Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Load(IServiceCollection services)
- {
- services.RegisterAssemblyPublicNonGenericClasses(Assembly.GetCallingAssembly())
- .Where(o => o.IsAssignableTo(typeof(ICommandHandler<>))).AsPublicImplementedInterfaces(ServiceLifetime.Singleton);
- services.AddSingleton<ICommandDispatcher, CommandDispatcher>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement