示例#1
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            // Init IoC Container
            var container     = TinyIoCContainer.Current;
            var tinyContainer = new TinyContainer(container);

            container.Register <IDependencyContainer>(tinyContainer);

            Resolver.SetResolver(new TinyResolver(container));

            // Init Forms
            Forms.Init();

            LoadApplication(new App());

            // Init PDF Viewer
            var builder = new ContainerBuilder();

            builder.RegisterType <DocumentBookmarksManager>().As <IDocumentBookmarksManager>().SingleInstance();
            builder.RegisterType <DocumentNoteManager>().As <IDocumentNoteManager>().SingleInstance();
            builder.RegisterType <SettingsManager>().As <ISettingsManager>().SingleInstance();

            MgrAccessor.Initialize(builder);

            // Print out path to the documents folder
            System.Diagnostics.Debug.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));

            // Return...
            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
示例#2
0
        public AppDelegate()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <MyDocumentBookmarksManager>().As <IDocumentBookmarksManager>().SingleInstance();
            builder.RegisterType <MyDocumentNoteManager>().As <IDocumentNoteManager>().SingleInstance();
            builder.RegisterType <SettingsManager>().As <ISettingsManager>().SingleInstance();

            MgrAccessor.Initialize(builder);
        }