public async override void Initialize() { RegisterAppStart <HomeViewModel>(); Mvx.RegisterType(typeof(IHttpClient), typeof(HttpClientImpl)); Mvx.ConstructAndRegisterSingleton <IServicesManager, ServicesManager>(); await TMDbApiConfig.InitializeAsync(Mvx.Resolve <IHttpClient>()); }
public override void Initialize() { #pragma warning disable CS0618 // Type or member is obsolete Mvx.ConstructAndRegisterSingleton <IApis, Apis>(); #pragma warning restore CS0618 // Type or member is obsolete RegisterAppStart <HomeViewModel>(); }
protected override IMvxApplication CreateApp() { Mvx.ConstructAndRegisterSingleton <INetworkService, NetworkService>(); Mvx.RegisterType <ITimerService, TimerService>(); Mvx.ConstructAndRegisterSingleton <IGLOSAWiFiService, GLOSAWiFiService>(); return(new Core.App()); }
protected override void InitializeLastChance() { base.InitializeLastChance(); Mvx.ConstructAndRegisterSingleton <IGeoCoderService, GeoCoderService>(); Mvx.ConstructAndRegisterSingleton <IGeoCoderService, CachedGeoCoderService>(); Mvx.ConstructAndRegisterSingleton <ILocationTrackerService, LocationTrackerService>(); }
public override void Initialize() { Mvx.ConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); var appStart = Mvx.Resolve <IMvxAppStart>(); RegisterAppStart(appStart); }
protected override void InitializeIoC() { base.InitializeIoC(); Mvx.ConstructAndRegisterSingleton <IConfigService, ConfigService>(); Mvx.ConstructAndRegisterSingleton <IConfigManager, ConfigManager>(); // Setting the device as android Mvx.Resolve <IConfigManager>().Device = Device.ANDROID; }
protected override void InitializeLastChance() { base.InitializeLastChance(); MvvmCross.Plugins.File.PluginLoader.Instance.EnsureLoaded(); MvvmCross.Plugins.DownloadCache.PluginLoader.Instance.EnsureLoaded(); Acr.Settings.Settings.InitRoaming(ApplicationContext.PackageName); Mvx.GetSingleton <IMvxTargetBindingFactoryRegistry>().RegisterCustomBindingFactory <TextView>("BBCode", view => new BBCodeBinding(view)); Mvx.ConstructAndRegisterSingleton <IMvxLocalFileImageLoader <Bitmap>, VectorFileImageLoader>(); }
public override void Initialize() { CreatableTypes().EndingWith("Service").AsInterfaces().RegisterAsLazySingleton(); Mvx.ConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); var appStart = Mvx.Resolve <IMvxAppStart>(); RegisterAppStart(appStart); }
public override void Initialize() { Mvx.ConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); Mvx.RegisterSingleton <IMvxFormsPageLoader>(new MvxFormsViewLoader()); var appStart = Mvx.Resolve <IMvxAppStart>(); RegisterAppStart(appStart); }
protected override void InitializePlatformServices() { base.InitializePlatformServices(); Mvx.RegisterSingleton <IDreamsLogService>(() => new DreamsLogService(_applicationContext)); Mvx.Resolve <IDreamsLogService>(); // Trigger creation of singleton Mvx.ConstructAndRegisterSingleton <IDialogService, DialogService>(); }
protected override void InitializeLastChance() { base.InitializeLastChance(); Mvx.ConstructAndRegisterSingleton <IGeoCoderService, GeoCoderService>(); Mvx.ConstructAndRegisterSingleton <IGeoCoderService, CachedGeoCoderService>(); Mvx.ConstructAndRegisterSingleton <IShareService, ShareService>(); Mvx.Resolve <ILocationService>().StartWatching(); }
protected override IMvxApplication CreateApp() { Mvx.ConstructAndRegisterSingleton <IMvxJsonConverter, JsonSerializer>(); var preferencesManager = new PreferencesManager(); var storageContainer = new LocalStorageContainer(); var keyStorage = new LocalKeyStorageContainer(storageContainer); var deviceInformationService = new DeviceInformationService(); return(new Client.Shared.App(keyStorage, storageContainer, preferencesManager, deviceInformationService)); }
public override void Initialize() { base.Initialize(); Mvx.ConstructAndRegisterSingleton <IMvxAppStart, MvxAppExtendedStart>(); Mvx.RegisterSingleton <IMvxTextProvider>(new MvxResxTextProvider(AppResources.ResourceManager)); RegisterCustomAppStart <MvxAppExtendedStart>(); }
public override void Initialize() { base.Initialize(); //Register extended app startup in IoC container: Mvx.ConstructAndRegisterSingleton <IMvxAppStart, CustomStart>(); var appStart = Mvx.Resolve <IMvxAppStart>(); RegisterAppStart(appStart); }
/// <summary> /// Initializes the first chance. /// </summary> protected override void InitializeFirstChance() { Mvx.ConstructAndRegisterSingleton <IApplicationConfigurationService, AndroidConfigurationService>(); Mvx.ConstructAndRegisterSingleton <IUserInteraction, UserInteraction>(); Mvx.ConstructAndRegisterSingleton <ISettings, MvxAndroidSettings>(); Mvx.ConstructAndRegisterSingleton <IPlatformCapabilities, AndroidPlatformCapabilities>(); base.InitializeFirstChance(); }
public MvxApp() { Mvx.RegisterType <IDispatcherUtility>(() => new DispatcherUtility(() => App.Current.CurrentActivity)); Mvx.RegisterType <ICredentialUtility, CredentialUtility>(); Mvx.RegisterType <ISettingsUtility>( () => new SettingsUtility(PreferenceManager.GetDefaultSharedPreferences(App.Current))); Mvx.RegisterType <IStorageUtility, StorageUtility>(); Mvx.ConstructAndRegisterSingleton <IApplicationUtility, ApplicationUtility>(); Mvx.RegisterSingleton <IMvxAppStart>(new MvxAppStart <MainViewModel>()); Mvx.RegisterType <IFindierService, FindierService>(); }
public override void Initialize() { CreatableTypes() .EndingWith("Service") .AsInterfaces() .RegisterAsLazySingleton(); Mvx.ConstructAndRegisterSingleton <ISquareRtCalculator, SquareRtCalculator>(); RegisterNavigationServiceAppStart <ViewModels.SquareRtViewModel>(); }
public static void Register() { MvxSimpleIoCContainer.Initialize(); Mvx.ConstructAndRegisterSingleton <IUserDialogService, UserDialogService>(); Mvx.ConstructAndRegisterSingleton <IGitHubDataProvider, GitHubDataProvider>(); Mvx.ConstructAndRegisterSingleton <INavigationService, NavigationService>(); Mvx.RegisterType <IRepositoriesViewModel, RepositoriesViewModel>(); Mvx.RegisterType <IRepositoryDetailsViewModel, RepositoryDetailsViewModel>(); }
public override void Initialize() { base.Initialize(); // Construct custom application start object Mvx.ConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); var appStart = Mvx.Resolve <IMvxAppStart>(); // register the appstart object RegisterAppStart(appStart); }
public override void Initialize() { Mvx.ConstructAndRegisterSingleton <IMyHealthClient, MyHealthClient> (); Mvx.RegisterType <ICurrentUserService, CurrentUserService>(); CreatableTypes() .EndingWith("Service") .AsInterfaces() .RegisterAsLazySingleton(); RegisterAppStart(new AppStart()); }
/// <summary> /// Ensures the platform specific version is loaded /// </summary> public void EnsureLoaded() { Mvx.CallbackWhenRegistered <IMvxFileStore>( () => Mvx.CallbackWhenRegistered <IMvxUserInteraction>(() => { Mvx.ConstructAndRegisterSingleton <IFeedbackDataService, FeedbackDataService>(); var manager = Mvx.Resolve <IMvxPluginManager>(); manager.EnsurePlatformAdaptionLoaded <PluginLoader>(); ((MvxFeedbackDialog)Mvx.GetSingleton <IMvxFeedbackDialog>()).SetConfiguration(_configuration); })); }
protected override void InitializeFirstChance() { Mvx.ConstructAndRegisterSingleton <IPageService, PageService>(); Mvx.ConstructAndRegisterSingleton <ITimerService, TimerService>(); Mvx.ConstructAndRegisterSingleton <IDeviceService, DeviceService>(); Mvx.ConstructAndRegisterSingleton <IPopupService, PopupService>(); Mvx.ConstructAndRegisterSingleton <ISettings, TrackMe.Services.Settings>(); Mvx.ConstructAndRegisterSingleton <ILocalize, Localize>(); base.InitializeFirstChance(); }
protected override void InitializeLastChance() { base.InitializeLastChance(); Mvx.ConstructAndRegisterSingleton <IDialogService, DialogService>(); //IFetcherRepositoryStoragePathService path = new FetcherRepositoryStoragePathService(); //IFetcherRepositoryService repository = new FetcherRepositoryService(path); //IFetcherWebService web = new FetcherWebService(); //Mvx.LazyConstructAndRegisterSingleton<IFetcherService>(() => new FetcherService(web, repository)); }
public App() { Mvx.RegisterSingleton(Acr.UserDialogs.UserDialogs.Instance); Mvx.RegisterSingleton(Plugin.FileSystem.CrossFileSystem.Current); Mvx.RegisterSingleton(Plugin.LocalNotifications.CrossLocalNotifications.Current); Mvx.RegisterSingleton(Plugin.VersionTracking.CrossVersionTracking.Current); Mvx.RegisterSingleton(Plugin.Settings.CrossSettings.Current); Mvx.ConstructAndRegisterSingleton <ICryptographyService, CryptographyService>(); Mvx.ConstructAndRegisterSingleton <ISaveStateService, SaveStateService>(); Mvx.LazyConstructAndRegisterSingleton <IEmulationService, EmulationService>(); Mvx.LazyConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); }
public override void Initialize() { CreatableTypes() .EndingWith("Service") .AsInterfaces() .RegisterAsLazySingleton(); Mvx.RegisterSingleton <IProvider>(() => new RestProvider()); Mvx.ConstructAndRegisterSingleton <IRepository, DataRepository>(); RegisterAppStart <ViewModels.SplashViewModel>(); }
public void Load() { Mvx.ConstructAndRegisterSingleton <IFetcherLoggerService, FetcherLoggerService>(); Mvx.ConstructAndRegisterSingleton <IFetcherWebService, FetcherWebService>(); Mvx.ConstructAndRegisterSingleton <IFetcherRepositoryStoragePathService, FetcherRepositoryStoragePathService>(); Mvx.LazyConstructAndRegisterSingleton <IFetcherRepositoryService>(() => new FetcherRepositoryService(Mvx.Resolve <IFetcherLoggerService>(), () => CreateConnection(Mvx.Resolve <IFetcherRepositoryStoragePathService>()))); Mvx.ConstructAndRegisterSingleton <IFetcherService, FetcherService>(); // Ensure database tables are created var repository = Mvx.Resolve <IFetcherRepositoryService>() as FetcherRepositoryService; Task.Run(async() => await repository.Initialize()); }
public override void Initialize() { //Registra todos os tipos cujo nome termina em Service CreatableTypes() .EndingWith("Service") .AsInterfaces() .RegisterAsLazySingleton(); Mvx.RegisterSingleton(new MyOtherService()); Mvx.ConstructAndRegisterSingleton <IMyService, MyService>(); RegisterAppStart <ViewModels.DependencyViewModel>(); }
private static void Configurate() { ////здесь будет конфигурироваться DI контейнер MvxSimpleIoCContainer.Initialize(); Mvx.RegisterSingleton <IOrderService>(new OrderService()); Mvx.RegisterSingleton <IUserService>(new UserService()); Mvx.RegisterSingleton <IOrderHubService>(new OrderHubService()); Mvx.ConstructAndRegisterSingleton <IUserController, UserController>(); Mvx.ConstructAndRegisterSingleton <IOrderController, OrderController>(); }
/// <summary> /// Initializes this instance. /// </summary> public override void Initialize() { Mvx.ConstructAndRegisterSingleton <IUserSettings, UserSettings>(); PluginLoader.Instance.EnsureLoaded(); Mvx.ConstructAndRegisterSingleton <IMancobaMobileDataApi, MancobaMobileDataApi>(); Mvx.RegisterSingleton <IMobileDataService>(MobileDataService.DataServiceInstance); EntityMapping(); //Navigation.SetUp (); RegisterAppStart(new CustomApplicationStart()); }
public override void Initialize() { base.Initialize(); Mvx.ConstructAndRegisterSingleton <IMvxAppStart, AppStart>(); Mvx.RegisterSingleton(Acr.Settings.Settings.Local); // request a reference to the constructed appstart object var appStart = Mvx.Resolve <IMvxAppStart>(); // register the appstart object RegisterAppStart(appStart); }