// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); //app.UseCookiePolicy(); app.UseAuthentication(); var setting = AppSettings.Current(); setting.BaseNavigator = new DummyNavigtor(AppSettings.Current()); setting.BaseFiles = new DummyFiles(); setting.AppCenterServices = new[] { typeof(Analytics), typeof(Crashes) }; setting.LanguageContent = Language.GetText(); app.UseOoui(); Forms.Init(); VmBase.InitComponentManager(setting); VmBase.CManager.InitAllNotInitialized(); app.UseSession(); app.UseMvc(routes => { routes.MapRoute( "default", "{controller=Home}/{action=Index}/{id?}"); }); app.UseCookiePolicy(); }
/// <summary> /// Xamarin BISS MvvM initialisieren und starten IBissAppPlattform /// </summary> //public App(string deviceId, VmFiles vmFiles) public App(IBissAppPlattform plattform) { ThreadHelper.Initialize(Environment.CurrentManagedThreadId); InitializeComponent(); Language.CurrentDeviceCulture = CultureInfo.CurrentCulture; var setting = AppSettings.Current(); setting.BaseNavigator = new ViewModelXamarinPlattformNavigation((App)Current, setting); setting.BaseFiles = plattform.Files; //setting.AppCenterServices = new[] {typeof(Analytics), typeof(Crashes), typeof(Distribute), typeof(Push)}; setting.AppCenterServices = new[] { typeof(Analytics), typeof(Crashes) }; setting.LanguageContent = Language.GetText(); VmBase.InitComponentManager(setting); //ToDo: MKo Umbau finalisieren VmBase.AppConfigConstants = new AppConfigurationConstants(setting.AppConfigurationConstants); XamarinDeviceInfo.DeviceHardwareId = plattform.DeviceId; VmBase.CManager.InitHighest(); MainPage = new ViewSplash(plattform.Files); }