Exemplo n.º 1
0
        public void Startup(IBootstrapperContext context)
        {
            List <IBootstrapperAutoMapperRegistration> autoMapperRegistrations;
            List <Profile> profiles;

            autoMapperRegistrations = context.GetInstancesOfTypesImplementing <IBootstrapperAutoMapperRegistration>();
            profiles = context.GetInstancesOfTypesImplementing <Profile>();

            Mapper.Initialize(c =>
            {
                profiles.ForEach(c.AddProfile);
                autoMapperRegistrations.ForEach(m => m.RegisterMappings(c, context.Bag));
            });
        }
        public void Startup(IBootstrapperContext context)
        {
            var instances = context.GetInstancesOfTypesImplementing <IBootstrapperStartupTask>();
            var enriched  = EnrichTaskInstances(instances);

            enriched.OrderBy(a => a.Position).ToList().ForEach(a => a.Task.OnStartup(context.Bag));
        }
Exemplo n.º 3
0
        public void Startup(IBootstrapperContext context)
        {
            var instances = context.GetInstancesOfTypesImplementing <IBootstrapperLightCoreRegistration>();

            instances.ForEach(a => a.Register(_Builder, context.Bag));

            _Container = _Builder.Build();
        }