void ImageIsNull(UIImage image, ChallengeTypeModel challengeType) { if (image == null) { FileCachingService.BeginDownloadImageFromUrl(challengeType.ImageUrl, DownloadImageFromUrlCompleted); } }
static void InitializeServices(ServiceProvider serviceProvider) { var configuration = serviceProvider.GetService <IConfigurationManager>() .RetreiveConfiguration(config => config); fileCache = new FileCachingService(configuration.CacheCapacity); cvAdsAPIClient = new CVAdsAPIClient(configuration.CVAdsAPIConfiguration); geoLocationAPIClient = new GeolocationDBAPIClient(configuration.GeolocationDBAPIConfiguration); }
public void Initialize() { _asyncServiceMock = new Mock <IAsyncService>(); _fileCachingSettingsProviderMock = new Mock <IFileCachingSettingsProvider>(); _fileServiceMock = new Mock <IFileService>(); _service = new FileCachingService( _asyncServiceMock.Object, _fileCachingSettingsProviderMock.Object, _fileServiceMock.Object); }
public void LoadMain() { List <string> areaImageUrlList = SL.AreaList.Select(a => a.areaDefaultImageURL).ToList(); FileCachingService.PreloadImagesToDiskFromUrl(areaImageUrlList); ((IntroContainerViewModel)ViewModel).NavigateToMainView.Execute(); //UIStoryboard board = UIStoryboard.FromName("Main", null); //UIViewController ctrl = (UIViewController)board.InstantiateViewController("MainViewController"); //this.PresentViewController(ctrl, false, null); }
public ActiveRoutine( IServiceProvider serviceProvider, FileCachingService fileCache, CVAdsAPIClient cvAdsAPIClient, GeolocationDBAPIClient geoLocationAPIClient, LoginResponse smartDeviceState) { this.fileCache = fileCache; this.cvAdsAPIClient = cvAdsAPIClient; this.geoLocationAPIClient = geoLocationAPIClient; this.smartDeviceState = smartDeviceState; photoProvider = serviceProvider.GetService <IPhotoProvider>(); imageDisplayer = serviceProvider.GetService <IImageDisplayer>(); configurationManager = serviceProvider.GetService <IConfigurationManager>(); }
void Traverse() { try { AreasViewController areas = pageViewController.ViewControllers[0] as AreasViewController; if (areas != null && SL.HasAreas) { SL.Profile.SetDefaultAreaIfNeeded(); List <string> areaImageUrlList = SL.AreaList.Select(a => a.areaDefaultImageURL).ToList(); FileCachingService.PreloadImagesToDiskFromUrl(areaImageUrlList); LoadMain(); } else { NextPage(); } } catch (Exception) { } }