示例#1
0
        private static void Configure()
        {
            var config = new FoundationConfigurator
            {
                Business =
                {
                    BusinessInvocationLogger =
                        typeof(Kafala.BusinessManagers.SqlProcBusinessManagerInvocationLogger),
                    EmailLogger              = typeof(Foundation.Infrastructure.Notifications.EmailLogger)
                },

                Persistence =
                {
                    PocoPointer             = typeof(Kafala.Entities.Donor),
                    ConnectionStringKeyName = "Kafaladb"
                },

                UseBuseinssManagers = true,
                UseEmailing         = false,
                UsePresistence      = true,
                UseQueryContainer   = false,
                UseSecurity         = false,
                UseWeb = false,
            };

            FoundationKickStart.Configure(config);

            ObjectFactory.Configure(cfg => new Foundation.Persistence.Configurations.PersistenceConfigurator().Configure(cfg, config));

            ObjectFactory.Configure(cfg => new Foundation.Infrastructure.Configurations.InfrastructureConfigurator().Configure(cfg, config));
        }
示例#2
0
        public static void BootStrap()
        {
            var config = new FoundationConfigurator
            {
                Business =
                {
                    BusinessInvocationLogger =
                        typeof(Kafala.BusinessManagers.SqlProcBusinessManagerInvocationLogger),
                    EmailLogger              = typeof(Foundation.Infrastructure.Notifications.EmailLogger)
                },

                Persistence =
                {
                    PocoPointer             = typeof(Kafala.Entities.Donor),
                    ConnectionStringKeyName = "Kafaladbtest"
                },



                UseBuseinssManagers = true,
                UseEmailing         = true,
                UsePresistence      = true,
                UseQueryContainer   = true,
                UseSecurity         = true,
                UseWeb = false,
            };


            FoundationKickStart.Configure(config);
            ObjectFactory.Configure(cfg => new Foundation.Persistence.Configurations.PersistenceConfigurator().Configure(cfg, config));

            ObjectFactory.Configure(cfg => new Foundation.Infrastructure.Configurations.InfrastructureConfigurator().Configure(cfg, config));

            ObjectFactory.Configure(cfg => new Foundation.Web.Configurations.WebConfigurator().Configure(cfg, config));
            ObjectFactory.Configure(x => x.For <IFlashMessenger>().Use <SwallowFlashMessneger>());
        }
示例#3
0
        protected void Application_Start()
        {
            HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();

            var config = new FoundationConfigurator
            {
                Business =
                {
                    BusinessInvocationLogger =
                        typeof(Kafala.BusinessManagers.SqlProcBusinessManagerInvocationLogger),
                    EmailLogger              = typeof(Foundation.Infrastructure.Notifications.EmailLogger)
                },

                Persistence =
                {
                    PocoPointer             = typeof(Kafala.Entities.Donor),
                    ConnectionStringKeyName = "Kafaladb"
                },

                UseBuseinssManagers = true,
                UseEmailing         = true,
                UsePresistence      = true,
                UseQueryContainer   = true,
                UseSecurity         = true,
                UseWeb = true,

                Web =
                {
                    AuthenticationService        = typeof(Kafala.Query.Security.AuthenticationService),
                    DefaultPageTitle             = "Kafala Application",
                    ControllersAssemblyHookType  = typeof(DonorController),
                    FlashMessagesResourceManager = Resources.KafalaFlashMessages.ResourceManager,
                    PagingConfigurations         = new PagingConfigurations
                    {
                        ActivePageClass        = "active",
                        PaginationCssClass     = "pagination",
                        FirstPageText          = "First",
                        LastPageText           = "Last",
                        NextPageText           = "Next",
                        PreviousPageText       = "Previous",
                        SortableHeaderCssClass = "sortableheader",
                        SortedHeaderCssClass   = "Sorted",
                        SortedIcondAscending   = GlyphIcons.ChevronUp,
                        SortedIcondDescending  = GlyphIcons.ChevronDown
                    }
                }
            };


            FoundationKickStart.Configure(config);
            ObjectFactory.Configure(cfg => new Foundation.Persistence.Configurations.PersistenceConfigurator().Configure(cfg, config));

            ObjectFactory.Configure(cfg => new Foundation.Infrastructure.Configurations.InfrastructureConfigurator().Configure(cfg, config));

            ObjectFactory.Configure(cfg => new Foundation.Web.Configurations.WebConfigurator().Configure(cfg, config));


            AreaRegistration.RegisterAllAreas();

            ObjectFactory.Configure(cfg => cfg.For <ICurrentAuthenticateUser>().Use <CurrentAuthenticateUser>());


            Mapper.Initialize(AutoMapperConfigurations.Configure);


            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }