Пример #1
0
        private static Header ParseRelationshipHeader(Args args, IdType idType, Extractors extractors, Groups groups)
        {
            string definition = args.Get("relationship-header", null);

            if (string.ReferenceEquals(definition, null))
            {
                return(DataGeneratorInput.bareboneRelationshipHeader(idType, extractors));
            }

            Configuration config = Configuration.COMMAS;

            return(DataFactories.defaultFormatRelationshipFileHeader().create(Seeker(definition, config), config, idType, groups));
        }
Пример #2
0
        public static void Install(IWindsorContainer container)
        {
            DataFactories.Install(container);

            // Command
            container.Register(Classes.FromThisAssembly().BasedOn(typeof(ICmd <>)).WithServiceAllInterfaces().LifestyleTransient());
            container.Register(Component.For(typeof(ICmdHandler)).ImplementedBy(typeof(CmdHandler)).LifestyleTransient());

            // Query
            container.Register(Classes.FromThisAssembly().BasedOn(typeof(IQryWithParameters <,>)).WithServiceAllInterfaces().LifestyleTransient());
            container.Register(Classes.FromThisAssembly().BasedOn(typeof(IQryWithoutParameters <>)).WithServiceAllInterfaces().LifestyleTransient());
            container.Register(Component.For(typeof(IQryExecutor)).ImplementedBy(typeof(QryExecutor)).LifestyleTransient());
        }
Пример #3
0
        public static void Install(IWindsorContainer container)
        {
            DataFactories.Install(container);

            // Command
            container.Register(Classes.FromThisAssembly().BasedOn(typeof(ICrudService <>)).WithServiceAllInterfaces().LifestyleTransient());
            container.Register(Component.For(typeof(IOrderService)).ImplementedBy(typeof(SubmitOrderCmd)).LifestyleTransient());

            // Query
            container.Register(Component.For(typeof(IUserValidate)).ImplementedBy(typeof(UserValidateQry)).LifestyleTransient());
            container.Register(Component.For(typeof(IAuthenticateService)).ImplementedBy(typeof(AuthenticateServiceQry)).LifestyleTransient());
            container.Register(Component.For(typeof(IStoreService)).ImplementedBy(typeof(StoreQry)).LifestyleTransient());
            container.Register(Component.For(typeof(ICartService)).ImplementedBy(typeof(CartQuery)).LifestyleTransient());
            container.Register(Component.For(typeof(IOrdersQuery)).ImplementedBy(typeof(OrdersQry)).LifestyleTransient());
            container.Register(Component.For(typeof(IDropListService)).ImplementedBy(typeof(DropListServiceQry)).LifestyleTransient());
        }