示例#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);
            }
        }