Inheritance: MvxApplicationObject, IErrorReporter, IErrorSource
Exemple #1
0
        public App()
        {
            var errAppObj = new ErrorApplicationObject();
            var settings  = new Settings();

            settings.Load();

            this.RegisterServiceInstance <IMvxStartNavigation>(new StartApplicationObject());
            this.RegisterServiceInstance <IErrorSource>(errAppObj);
            this.RegisterServiceInstance <IErrorReporter>(errAppObj);
            this.RegisterServiceInstance <ISettingsProvider>(settings);
            this.RegisterServiceInstance <IMediaFileSource>(new MediaFileApplicationObject());

            var geo = new GeolocatorApplicationObject();

            geo.StartTracking();

            this.RegisterServiceInstance <IGeolocator>(geo);
            this.RegisterServiceInstance <IBarcodeScanner>(new BarcodeApplicatonObject());
        }
Exemple #2
0
        public App()
        {
            Azure = new MobileServiceClient(Config.AZURE_MOBILE_SERVICE_URL, Config.AZURE_MOBILE_SERVICE_APPKEY);

            var errAppObj = new ErrorApplicationObject();
            var settings  = new Settings();

            settings.Load();

            this.RegisterServiceInstance <IMvxStartNavigation>(new StartApplicationObject());
            this.RegisterServiceInstance <IErrorSource>(errAppObj);
            this.RegisterServiceInstance <IErrorReporter>(errAppObj);
            this.RegisterServiceInstance <ISettingsProvider>(settings);
            this.RegisterServiceInstance <IMediaFileSource>(new MediaFileApplicationObject());

            var geo = new GeolocatorApplicationObject();

            geo.StartTracking();

            this.RegisterServiceInstance <IGeolocator>(geo);
            this.RegisterServiceInstance <IBarcodeScanner>(new BarcodeApplicatonObject());
            this.RegisterServiceInstance <IAddressBookSource>(new AddressBookApplicationObject());
        }