Ejemplo n.º 1
0
        public void Execute <TCommand>(TCommand command) where TCommand : ICommand
        {
            var handler = (ICommandHandler <TCommand>)resolver.GetService(typeof(ICommandHandler <TCommand>));

            if (handler == null)
            {
                Console.WriteLine($"Handler for {typeof(ICommandHandler<TCommand>)} is null");
            }
            handler?.Handle(command);
        }
Ejemplo n.º 2
0
 public object GetService(Type serviceType)
 {
     return(_resolver.GetService(Registry, serviceType));
 }