public bool Init() { //TODO: move this to the constructors...but hey, so convienient just like this...maybe leave it as is... var ker = ((ResSched.App)Xamarin.Forms.Application.Current).Kernel; _dataService = ker.Get <IDataRetrievalService>(); _dataLoadService = ker.Get <IDataLoadService>(); return(true); }
public TransferVendorDataController( IVendorRepository vendorRepository, IVendorBankAccountRepository vendorBankAccountRepository, IDataRetrievalService dataRetrievalService) { _vendorRepository = vendorRepository; _vendorBankAccountRepository = vendorBankAccountRepository; _dataRetrievalService = dataRetrievalService; }
public DataRetrievalServiceTests() { ServiceProvider serviceProvider = new ServiceCollection() .AddHttpClient() .AddSingleton <IApiService, ApiService>() .AddSingleton <IDataRetrievalService, DataRetrievalService>() .BuildServiceProvider(); _dataRetrievalService = serviceProvider.GetService <IDataRetrievalService>(); _dataSetId = "5yv1I3dA1wg"; }
//https://developer.xamarin.com/api/type/System.IDisposable/ //http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface public CustomViewModelBase(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) { if (navService == null) { throw new ArgumentException("Invalid navService"); } NavService = navService; DataLoadService = dataLoadService; DataRetrievalService = dataRetrievalService; }
public static async Task Main() { try { IDataRetrievalService api = services.GetService <IDataRetrievalService>(); AuthenticationModel authenticated = await api.GetToken(); #region Web Request: var budget = api.GetBudgetReport(authenticated); var site = api.GetSiteReport(authenticated); var project = api.GetProjectReport(authenticated); var task = api.GetTaskReport(authenticated); var workEffort = api.GetWorkEffortReport(authenticated); #endregion IDatabaseCleanupService cleanup = services.GetService <IDatabaseCleanupService>(); await Task.WhenAll( api.GetBudgetReport(authenticated), cleanup.PurgeBudget(), api.GetSiteReport(authenticated), cleanup.PurgeSite(), api.GetProjectReport(authenticated), cleanup.PurgeProject(), api.GetTaskReport(authenticated), cleanup.PurgeTask(), api.GetWorkEffortReport(authenticated), cleanup.PurgeWorkEffort() ); IDatabaseImporterService importer = services.GetService <IDatabaseImporterService>(); await Task.WhenAll( importer.InsertBudget(await budget), importer.InsertSite(await site), importer.InsertProject(await project), importer.InsertTask(await task), importer.InsertWorkEffort(await workEffort) ); } catch (Exception exception) { exception.Decorate(Log.Logger); throw; } }
public LoadingScreenViewModel(IConnectivityService connectivityService, IDataRetrievalService dataRetrievalService, IEventService eventService, IMvxNavigationService navigationService, IProductService productService) { _connectivityService = connectivityService; _dataRetrievalService = dataRetrievalService; _eventService = eventService; _productService = productService; _navigationService = navigationService; }
public async Task RunQueuedUpdatesAsync(CancellationToken token) { if (_dataService == null) { _dataService = ((QuikRide.App)Xamarin.Forms.Application.Current).Kernel.GetService(typeof(IDataRetrievalService)) as IDataRetrievalService; } if (Connectivity.NetworkAccess == NetworkAccess.Internet) { await _dataService.RunQueuedUpdatesAsync(token); } else { Debug.WriteLine($"No connectivity - RunQueuedUpdatesAsync cannot run"); } }
//https://developer.xamarin.com/api/type/System.IDisposable/ //http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface public CustomViewModelBase(INavigationService navService, IDataRetrievalService dataRetrievalService, IDataDownloadService dataDownloadService, IStateService stateService, ILoggingService loggingService, IMemoryReporterService memoryReporterService) { if (navService == null) { throw new ArgumentException("Invalid navService"); } if (dataRetrievalService == null) { throw new ArgumentException("Invalid dataRetrievalService"); } if (dataDownloadService == null) { throw new ArgumentException("Invalid dataDownloadService"); } if (stateService == null) { throw new ArgumentException("Invalid stateService"); } if (loggingService == null) { throw new ArgumentException("Invalid loggingService"); } if (memoryReporterService == null) { throw new ArgumentException("Invalid memoryReporterService"); } NavService = navService; DataRetrievalService = dataRetrievalService; DataDownloadService = dataDownloadService; StateService = stateService; LoggingService = loggingService; MemoryReporterService = memoryReporterService; IsDev = false; #if DEBUG IsDev = true; #endif }
public FeedbackViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public UserLocationViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public DealersAndVehiclesService(IDataRetrievalService dataRetrievalService, ILogger <DealersAndVehiclesService> logger) { _dataRetrievalService = dataRetrievalService; _logger = logger; }
public MapWithPinsViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public static async Task <ObservableCollection <HourlySchedule> > BuildHourlyScheduleAsync(this IDataRetrievalService _dataRetrievalService, DateTime selectedDate, Guid resourceId) { var hourlySchedule = new ObservableCollection <HourlySchedule>(); var schedules = await _dataRetrievalService.GetResourceSchedules(resourceId, selectedDate); foreach (var h in Config.Hours) { var hour = selectedDate.AddHours(h); var sched = schedules.Where(x => x.ReservationStartDateTime <= hour && x.ReservationEndDateTime >= hour).FirstOrDefault(); hourlySchedule.Add(new HourlySchedule() { Hour = hour, ResourceSchedule = sched }); } return(hourlySchedule); }
public AccountViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public GeofencingViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { MyMonitoredRegions = new ObservableCollection <GeofenceRegion>(); RecentGeofenceActivity = new ObservableCollection <ModelsObj.GeofenceActivity>(); }
private UploadDataService() { _dataService = ((QuikRide.App)Xamarin.Forms.Application.Current).Kernel.GetService(typeof(IDataRetrievalService)) as IDataRetrievalService; }
public SplashViewModel(INavigationService navService, IDataRetrievalService dataRetrievalService, IDataDownloadService dataDownloadService, IStateService stateService, ILoggingService loggingService, IMemoryReporterService memoryReporterService) : base(navService, dataRetrievalService, dataDownloadService, stateService, loggingService, memoryReporterService) { }
public LoyaltyScannerViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public MyReservationRequestsViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { MyRequests = new ObservableCollection <ReservationRequest>(); }
public GameViewModel(INavigationService navService, IDataRetrievalService dataRetrievalService, IDataDownloadService dataDownloadService, IStateService stateService, ILoggingService loggingService, IMemoryReporterService memoryReporterService) : base(navService, dataRetrievalService, dataDownloadService, stateService, loggingService, memoryReporterService) { BingoInstanceContent = new List <ModelObj.BB.BingoInstanceContent>(); Players = new List <PlayerViewModel>(); }
public AboutViewModelMVVMDI(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }
public WelcomeViewModel(INavigationService navService, IDataRetrievalService dataRetrievalService, IDataDownloadService dataDownloadService, IStateService stateService, ILoggingService loggingService, IMemoryReporterService memoryReporterService) : base(navService, dataRetrievalService, dataDownloadService, stateService, loggingService, memoryReporterService) { Meetings = new ObservableCollection <Meeting>(); _hasLoaded = false; }
public BarcodeReaderViewModel(INavigationService navService, IDataLoadService dataLoadService, IDataRetrievalService dataRetrievalService) : base(navService, dataLoadService, dataRetrievalService) { }