示例#1
0
        public async void Configuration(IAppBuilder app, bool selfHostMode)
        {
            ObjectFactory.Configure(Fr8.Infrastructure.StructureMap.StructureMapBootStrapper.LiveConfiguration);
            StructureMapBootStrapper.ConfigureDependencies(StructureMapBootStrapper.DependencyType.LIVE);

            //For PlanDirectory merge
            ObjectFactory.Configure(PlanDirectoryBootStrapper.LiveConfiguration);


            ObjectFactory.GetInstance <AutoMapperBootStrapper>().ConfigureAutoMapper();

            var db = ObjectFactory.GetInstance <DbContext>();

            db.Database.Initialize(true);

            EventReporter curReporter = ObjectFactory.GetInstance <EventReporter>();

            curReporter.SubscribeToAlerts();

            IncidentReporter incidentReporter = ObjectFactory.GetInstance <IncidentReporter>();

            incidentReporter.SubscribeToAlerts();

            StartupMigration.UpdateTransitionNames();

            SetServerUrl();

            OwinInitializer.ConfigureAuth(app, "/Account/Index");

            if (!selfHostMode)
            {
                System.Web.Http.GlobalConfiguration.Configure(ConfigureControllerActivator);
            }

            ConfigureHangfire(app, "Fr8LocalDB");

#pragma warning disable 4014
            RegisterTerminalActions(selfHostMode);
#pragma warning restore 4014

            await GenerateManifestPages();

            EnsureMThasaDocuSignRecipientCMTypeStored();
        }
        public override void SetUp()
        {
            base.SetUp();

            _incidentReporter = ObjectFactory.GetInstance <IncidentReporter>();
        }