Esempio n. 1
0
        public override void Load()
        {
            // ViewModels
            Bind <MainViewModel>().ToSelf();
            Bind <DetailViewModel>().ToSelf();
            Bind <NewEntryViewModel>().ToSelf();
            // Core Services
            var tripLogService = new TripLogApiDataService(new Uri("https://vdpctriplog.azurewebsites.net"));

            Bind <ITripLogDataService>().ToMethod(x => tripLogService).InSingletonScope();
            Bind <Akavache.IBlobCache>().ToConstant(Akavache.BlobCache.LocalMachine);
        }
Esempio n. 2
0
        public override void Load()
        {
            // ViewModels
            Bind <SignInViewModel>().ToSelf();
            Bind <MainViewModel>().ToSelf();
            Bind <DetailViewModel>().ToSelf();
            Bind <NewEntryViewModel>().ToSelf();

            // Core services
            var tripLogService = new TripLogApiDataService(new      Uri("https://<your-service-name>.azurewebsites.net"), Helpers.Settings.TripLogApiAuthToken);

            Bind <ITripLogDataService>().ToMethod(x => tripLogService).InSingletonScope();

            Bind <Akavache.IBlobCache>().ToConstant(Akavache.BlobCache.LocalMachine);
        }
        public override void Load()
        {
            // ViewModels
            Bind <SignInViewModel>().ToSelf();
            Bind <MainViewModel>().ToSelf();
            Bind <DetailViewModel>().ToSelf();
            Bind <NewEntryViewModel>().ToSelf();

            // Core Services
            var apiAuthToken   = Preferences.Get("apitoken", "");
            var tripLogService = new TripLogApiDataService(new Uri("https://<your-function-name>.azurewebsites.net"), apiAuthToken);

            Bind <ITripLogDataService>()
            .ToMethod(x => tripLogService)
            .InSingletonScope();

            Bind <Akavache.IBlobCache>().ToConstant(Akavache.BlobCache.LocalMachine);
            Bind <IAuthService>().To <AuthService>().InSingletonScope();
        }
Esempio n. 4
0
        public override void Load()
        {
            // ViewModels
            Bind <MainViewModel>().ToSelf();
            Bind <DetailViewModel>().ToSelf();
            Bind <NewEntryViewModel>().ToSelf();

            // Core Services
            var tripLogService = new TripLogApiDataService(new Uri(
                                                               "https://{your-Entries-API-Server}"));

            Bind <ITripLogDataService>().ToMethod(x => tripLogService)
            .InSingletonScope();

            Bind <Akavache.IBlobCache>()
            .ToConstant(Akavache.BlobCache.LocalMachine);

            Bind <IAnalyticsService>().To <AppCenterAnalyticsService>()
            .InSingletonScope();
        }
Esempio n. 5
0
        public override void Load()
        {
            //ViewModels
            Bind <MainViewModel>()
            .ToSelf();
            Bind <DetailViewModel>()
            .ToSelf();
            Bind <NewEntryViewModel>()
            .ToSelf();

            //Core services
            //Azure Data Access
            var tripLogService = new TripLogApiDataService(new Uri(URL));

            Bind <ITripLogDataService>()
            .ToMethod(x => tripLogService)
            .InSingletonScope();

            //Akavache (offline data caching)
            Bind <Akavache.IBlobCache>()
            .ToConstant(Akavache.BlobCache.LocalMachine);
        }