Example #1
0
 /// <summary>
 /// Initializes a new instance of the iOSApplicationHost class.
 /// </summary>
 /// <param name="appDelegate">The application delegate hosting the iOS app.</param>
 /// <param name="viewControllerTypes">
 /// A collection of view controllers and their associated view models used by the application.
 /// If null, the host will scan the calling assembly for view controllers.
 /// </param>
 /// <param name="createApplicationInstance">A factory method for creating application instances.</param>
 public iOSApplicationHost(
     UIApplicationDelegate appDelegate,
     ViewControllerTypes viewControllerTypes,
     Func <ApplicationHost, Session, ApplicationInstance> createApplicationInstance)
     : base(createApplicationInstance)
 {
     this.appDelegate         = appDelegate;
     this.viewControllerTypes = viewControllerTypes;
     this.Initialize();
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the iOSApplicationHost class.
 /// </summary>
 /// <param name="appDelegate">The application delegate hosting the iOS app.</param>
 /// <param name="viewControllerTypes">
 /// A collection of view controllers and their associated view models used by the application.
 /// If null, the host will scan the calling assembly for view controllers.
 /// </param>
 /// <param name="applicationInstanceFactory">An object used to create application instances.</param>
 public iOSApplicationHost(
     UIApplicationDelegate appDelegate,
     ViewControllerTypes viewControllerTypes,
     IApplicationInstanceFactory applicationInstanceFactory)
     : base(applicationInstanceFactory)
 {
     this.appDelegate         = appDelegate;
     this.viewControllerTypes = viewControllerTypes;
     this.Initialize();
 }
Example #3
0
        private void Initialize()
        {
            if (this.viewControllerTypes == null)
            {
                this.viewControllerTypes = ViewControllerTypes.FromAssembly(this.appDelegate.GetType().GetTypeInfo().Assembly);
            }

            this.addressBook       = new Lazy <iOSAddressBook>(() => new iOSAddressBook());
            this.alert             = new Lazy <iOSApplicationAlert>(() => new iOSApplicationAlert(this.GetPresentingViewController));
            this.systemInformation = new Lazy <iOSSystemInformation>(() => new iOSSystemInformation());
            this.networkStatus     = new Lazy <iOSNetworkStatus>(() => new iOSNetworkStatus());
            this.componentCatalog  = new Lazy <iOSComponentCatalog>(() => new iOSComponentCatalog(this.GetPresentingViewController));
            this.deviceCatalog     = new Lazy <iOSDeviceCatalog>(() => new iOSDeviceCatalog());
            this.deviceSettings    = new Lazy <iOSDeviceSettings>(() => new iOSDeviceSettings());
            this.statusBar         = new Lazy <iOSDeviceStatusBar>(() => new iOSDeviceStatusBar());
        }