Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 public FileService(
     IMvxExtendedFileStore fileStore,
     IExceptionPolicyService exceptionPolicy)
 {
     _fileStore       = fileStore;
     _exceptionPolicy = exceptionPolicy;
 }
Exemplo n.º 3
0
 public OrgViewModel(
     IEnvironmentService environmentService,
     IConfiguration configuration,
     ISmartWalkApiService apiService,
     IAnalyticsService analyticsService,
     IExceptionPolicyService exceptionPolicy,
     IPostponeService postponeService) :
     base(configuration,
          environmentService,
          analyticsService,
          postponeService)
 {
     _apiService      = apiService;
     _exceptionPolicy = exceptionPolicy;
 }
Exemplo n.º 4
0
        public VenueViewModel(
            IEnvironmentService environmentService,
            IConfiguration configuration,
            ISmartWalkApiService apiService,
            IAnalyticsService analyticsService,
            IExceptionPolicyService exceptionPolicy,
            IPostponeService postponeService,
            IFavoritesService favoritesService) :
            base(
                configuration,
                environmentService,
                analyticsService,
                postponeService)
        {
            _environmentService = environmentService;
            _apiService         = apiService;
            _analyticsService   = analyticsService;
            _exceptionPolicy    = exceptionPolicy;

            FavoritesManager = new FavoritesShowManager(favoritesService, analyticsService);
        }
Exemplo n.º 5
0
        public OrgEventViewModel(
            IEnvironmentService environmentService,
            ISmartWalkApiService apiService,
            IConfiguration configuration,
            IAnalyticsService analyticsService,
            IExceptionPolicyService exceptionPolicy,
            ICalendarService calendarService,
            IPostponeService postponeService,
            IFavoritesService favoritesService)
            : base(environmentService.Reachability, analyticsService, postponeService)
        {
            _environmentService = environmentService;
            _apiService         = apiService;
            _configuration      = configuration;
            _analyticsService   = analyticsService;
            _calendarService    = calendarService;
            _exceptionPolicy    = exceptionPolicy;

            FavoritesManager = new FavoritesShowManager(favoritesService, analyticsService);
            FavoritesManager.FavoritesUpdated += (sender, e) => ResetAllShows();
        }
Exemplo n.º 6
0
        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();
        }