Esempio n. 1
0
        /// <summary>
        /// The entry point for bootstrapping an android Service on the android platform.
        /// </summary>
        /// <typeparam name="TStartup">The startup class to participate on configuring the IServiceProvider.</typeparam>
        /// <param name="Service">The Android.App.Service to be bootstrapped.</param>
        /// <param name="activatorServiceProvider">A service provider that can be used when activating instances of the <typeparamref name="TStartup"/> classes - if you want to inject them.</param>
        /// <returns></returns>
        public static IServiceProvider Initialise <TStartup>(this Service service, IServiceCollection services, IServiceProvider activatorServiceProvider = null)
            where TStartup : IStartup
        {
            services.AddAndroidHostingEnvironment();
            var bootstrapper = new AndroidBootstrapper();

            return(bootstrapper.BootstrapFromStartupClasses <TStartup>(services, activatorServiceProvider));
        }
Esempio n. 2
0
 private void WireupDependency()
 {
     // Wire up dependencies of core classes
     ContainerManager.Initialize();
     CommonBootstrapper.Initialize(ContainerManager.Container);
     DataBootstrapper.Initialize(ContainerManager.Container);
     FormsBootstrapper.Initialize(ContainerManager.Container);
     AndroidBootstrapper.Initialize(ContainerManager.Container);
 }