예제 #1
0
 private static void RegisterQueryForDefaultCrudCommands(Type type, Type genericCommand, Registry registry)
 {
     if (type.ImplementsInterfaceTemplate(genericCommand))
     {
         MvcQueryRegistrar.BuildQueryRegistrarForCrudCommand(type, genericCommand).RegisterQuery(registry);
     }
 }
예제 #2
0
        public void Process(Type type, Registry registry)
        {
            if (type.ImplementsInterfaceTemplate(typeof(IQueryHandler <,>)))
            {
                MvcQueryRegistrar.BuildQueryRegistrarForHandler(type).RegisterQuery(registry);
            }

            if (type.ImplementsInterfaceTemplate(typeof(ICommandHandler <>)))
            {
                MvcCommandRegistrar.BuildCommandRegistrarForHandler(type).RegisterCommand(registry);
            }
        }