Пример #1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            var databasePath =
                System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "database.db3");

            var resolverContainer = new XLabs.Ioc.Unity.UnityDependencyContainer();

            resolverContainer.Register <IActorRepository>(new ActorRepository(databasePath));

            XLabs.Ioc.Resolver.SetResolver(resolverContainer.GetResolver());



            global::Xamarin.Forms.Forms.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            var databasePath =
                System.IO.Path.Combine(System.Environment.GetFolderPath(
                                           System.Environment.SpecialFolder.MyDocuments), "database.db3");

            var resolverContainer = new XLabs.Ioc.Unity.UnityDependencyContainer();

            resolverContainer.Register <IActorRepository>(new ActorRepository(databasePath));

            XLabs.Ioc.Resolver.SetResolver(resolverContainer.GetResolver());


            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            LoadApplication(new App());
        }