private void SetupPlatformTypes()
        {
            RegisterServiceInstance<IMvxLifetime>(new MvxWindowsPhoneLifetimeMonitor());
            RegisterServiceInstance<IMvxTrace>(new MvxDebugTrace());
            RegisterServiceType<IMvxSimpleFileStoreService, MvxIsolatedStorageFileStoreService>();
            RegisterServiceType<IMvxWebBrowserTask, MvxWebBrowserTask>();
            RegisterServiceType<IMvxPhoneCallTask, MvxPhoneCallTask>();
            RegisterServiceType<IMvxPictureChooserTask, MvxPictureChooserTask>();
            RegisterServiceType<IMvxCombinedPictureChooserTask, MvxPictureChooserTask>();            
            RegisterServiceType<IMvxResourceLoader, MvxWindowsPhoneResourceLoader>();
            RegisterServiceType<IMvxBookmarkLibrarian, MvxWindowsPhoneLiveTileBookmarkLibrarian>();

#warning Would be nice if sound effects were optional so that not everyone has to link to xna!
            var soundEffectLoader = new MvxSoundEffectObjectLoader();
            RegisterServiceInstance<IMvxResourceObjectLoaderConfiguration<IMvxSoundEffect>>(soundEffectLoader);
            RegisterServiceInstance<IMvxResourceObjectLoader<IMvxSoundEffect>>(soundEffectLoader);

#warning Would be very nice if GPS were optional!
            RegisterServiceInstance<IMvxGeoLocationWatcher>(new MvxWindowsPhoneGeoLocationWatcher());
        }
Beispiel #2
0
        private void SetupPlatformTypes()
        {
            RegisterServiceInstance <IMvxLifetime>(new MvxWindowsPhoneLifetimeMonitor());
            RegisterServiceInstance <IMvxTrace>(new MvxDebugTrace());
            RegisterServiceType <IMvxSimpleFileStoreService, MvxIsolatedStorageFileStoreService>();
            RegisterServiceType <IMvxWebBrowserTask, MvxWebBrowserTask>();
            RegisterServiceType <IMvxPhoneCallTask, MvxPhoneCallTask>();
            RegisterServiceType <IMvxComposeEmailTask, MvxComposeEmailTask>();
            RegisterServiceType <IMvxShareTask, MvxShareTask>();
            RegisterServiceType <IMvxPictureChooserTask, MvxPictureChooserTask>();
            RegisterServiceType <IMvxCombinedPictureChooserTask, MvxPictureChooserTask>();
            RegisterServiceType <IMvxResourceLoader, MvxWindowsPhoneResourceLoader>();
            RegisterServiceType <IMvxBookmarkLibrarian, MvxWindowsPhoneLiveTileBookmarkLibrarian>();

#warning Would be nice if sound effects were optional so that not everyone has to link to xna!
            var soundEffectLoader = new MvxSoundEffectObjectLoader();
            RegisterServiceInstance <IMvxResourceObjectLoaderConfiguration <IMvxSoundEffect> >(soundEffectLoader);
            RegisterServiceInstance <IMvxResourceObjectLoader <IMvxSoundEffect> >(soundEffectLoader);

#warning Would be very nice if GPS were optional!
            RegisterServiceInstance <IMvxGeoLocationWatcher>(new MvxWindowsPhoneGeoLocationWatcher());
        }