Beispiel #1
0
 public void Configuration(IAppBuilder app)
 {
     AppInitializer.Initalize(new AppServicesInit());
     app.UseCors(CorsOptions.AllowAll);
     ConfigureOAuth(app);
     ConfigureWebApi(app);
 }
Beispiel #2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            AppInitializer.Initalize(new WpfAppInit());

            LoginView           vwLogin    = DI.DefaultServiceProvider.GetService <LoginView>();
            NameValueCollection parameters = new NameValueCollection();

            parameters.Add(ViewParams.Mode.Param, ViewParams.Mode.Popup);
            ViewModel.NavigateTo(DI.DefaultServiceProvider.GetService <LoginViewModel>(), vwLogin, parameters, null, null);
        }
Beispiel #3
0
        /// <summary>
        /// Constructs a new DefaultServiceProviderHostFactory and ensures the app is initialized
        /// </summary>
        public DefaultServiceProviderHostFactory()
        {
            if (DI.DefaultServiceProvider != null)
            {
                return;
            }
            const string CfgAppInit = "xomfwk:AppInitializer";
            Type         initType   = AppInitializer.GetType(ConfigurationManager.AppSettings[CfgAppInit]);

            if (initType == null)
            {
                throw new ApplicationException("Cannot instantiate DI application initializer. Make sure you set the "
                                               + CfgAppInit + " config to a subclass of the AppInitalizer with a default constructor.");
            }
            AppInitializer.Initalize(Activator.CreateInstance(initType) as AppInitializer);
        }
Beispiel #4
0
 public void Configuration(IAppBuilder app)
 {
     AppInitializer.Initalize(new WebAppInit());
     app.Use <DIMiddleware>();
     ConfigureAuth(app);
 }