protected void Application_Start() { ServerCredentialsConfiguration.Configure(); AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); DIConfiguration.Configure(); MetadataProvidersConfiguration.Configure(); FilterProvidersConfiguration.Configure(); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { Rg.Plugins.Popup.Popup.Init(); global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental"); global::Xamarin.Forms.Forms.Init(); global::Xamarin.Forms.FormsMaterial.Init(); DIServiceContainer.Container = DIConfiguration.Configure(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // static function to configure DI in separate project DIConfiguration.Configure(Configuration, services); // static function to configure DB Contexts in separate project ContextConfiguration.Configuration(Configuration, services); // In production, the React files will be served from this directory services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/build"; }); }
protected override void OnCreate(Bundle savedInstanceState) { //global::Xamarin.Forms.Forms.SetTitleBarVisibility(this, Xamarin.Forms.AndroidTitleBarVisibility.Never); base.OnCreate(savedInstanceState); UserDialogs.Init(this); Rg.Plugins.Popup.Popup.Init(this); DIServiceContainer.Container = DIConfiguration.Configure(); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState); LoadApplication(new App()); }
public static void Register(HttpConfiguration config) { // Web API configuration and services config.EnableCors(); DIConfiguration.Configure(); config.DependencyResolver = new AditiApiDependencyResolver(); // Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); }