public HomeViewModel( ISmartWalkApiService apiService, IExceptionPolicyService exceptionPolicy, IAnalyticsService analyticsService, IReachabilityService reachabilityService, ILocationService locationService, IPostponeService postponeService) : base(reachabilityService, analyticsService, postponeService) { _apiService = apiService; _exceptionPolicy = exceptionPolicy; _analyticsService = analyticsService; _locationService = locationService; _reachabilityService = reachabilityService; _parameters = new Parameters(); _locationService.LocationChanged += (s, e) => UpdateData(UpdateEventInfos, false); _locationService.LocationStringChanged += (s, e) => UpdateLocationString(); _reachabilityService.StateChanged += (s, e) => UpdateConnectedStatus().ContinueWithThrow(); UpdateConnectedStatus().ContinueWithThrow(); UpdateLocationString(); }
protected NewsViewModel(IMvxNavigationService navigation , IMvxMessenger messenger , INewsService news , IReachabilityService reachability , IFeatureStore featureStore , IBrowserService browser , IDialogService dialog) { _navigation = navigation; _messenger = messenger; _news = news; _reachability = reachability; _featureStore = featureStore; _browser = browser; _dialog = dialog; _stories = new MvxObservableCollection <StoryItemViewModel>(); ShowStoryCommand = new MvxAsyncCommand <StoryItemViewModel>(OnShowStory, item => item.Filled && item.Story.Type == ItemType.Story); RefreshCommand = new MvxAsyncCommand(LoadStories); ShowSettingsCommand = new MvxAsyncCommand(() => _navigation.Navigate <SettingsViewModel>()); _fillerToken = messenger.Subscribe <NewsItemMessage>(OnItemReceived); TabPresentation = featureStore.IsEnabled(Features.StoryTabPresentation); }
public PostponeService( IConfiguration configuration, IReachabilityService reachabilityService) { PostponeTime = configuration.PostponeTime; _reachabilityService = reachabilityService; }
public MockNewsViewModel(IMvxNavigationService navigation , IMvxMessenger messenger , INewsService news , IReachabilityService reachability , IFeatureStore featureStore , IBrowserService browser , IDialogService dialog) : base(navigation, messenger, news, reachability, featureStore, browser, dialog) =>
public EnvironmentService( IMvxPhoneCallTask phoneCallTask, IMvxComposeEmailTask composeEmailTask, IReachabilityService reachabilityService) { _phoneCallTask = phoneCallTask; _composeEmailTask = composeEmailTask; _reachabilityService = reachabilityService; }
protected RefreshableViewModel( IReachabilityService reachabilityService, IAnalyticsService analyticsService, IPostponeService postponeService) : base(analyticsService) { _reachabilityService = reachabilityService; _analyticsService = analyticsService; _postponeService = postponeService; }
public SmartWalkApiService( IHttpService httpService, ICacheService cacheService, IReachabilityService reachabilityService, IConfiguration configuration) { _httpService = httpService; _cacheService = cacheService; _reachabilityService = reachabilityService; _configuration = configuration; }
public LocationService( ISettings settings, IExceptionPolicyService exceptionPolicy, IReachabilityService reachabilityService, IEnvironmentService environmentService) { _settings = settings; _exceptionPolicy = exceptionPolicy; _environmentService = environmentService; _reachabilityService = reachabilityService; _reachabilityService.StateChanged += (s, e) => UpdateLocationString().ContinueWithThrow(); _geocoder = new CLGeocoder(); _locationManager = new CLLocationManager(); _locationManager.DesiredAccuracy = CLLocation.AccuracyThreeKilometers; _locationManager.DistanceFilter = 3000; // 3 Km _locationManager.AuthorizationChanged += OnAuthorizationChanged; SaveLocationSettings(CurrentLocation); UpdateLocationString().ContinueWithThrow(); }