Esempio n. 1
0
 public ExposureNotificationHandler()
 {
     this.httpDataService             = Xamarin.Forms.DependencyService.Resolve <IHttpDataService>();
     this.userDataService             = Xamarin.Forms.DependencyService.Resolve <UserDataService>();
     userData                         = this.userDataService.Get();
     userDataService.UserDataChanged += (s, e) => userData = userDataService.Get();
 }
 public ExposureNotificationService(HttpDataService httpDataService, UserDataService userDataService)
 {
     this.httpDataService = httpDataService;
     this.userDataService = userDataService;
     userData             = this.userDataService.Get();
     this.userDataService.UserDataChanged += _userDataChanged;
 }
 public ExposureNotificationService(INavigationService navigationService, UserDataService userDataService, HttpDataService httpDataService)
 {
     this.httpDataService   = httpDataService;
     this.navigationService = navigationService;
     this.userDataService   = userDataService;
     userData = userDataService.Get();
     userDataService.UserDataChanged += OnUserDataChanged;
 }
 public ExposureNotificationService(INavigationService navigationService, UserDataService userDataService, IHttpDataService httpDataService)
 {
     this.httpDataService   = httpDataService;
     this.navigationService = navigationService;
     this.userDataService   = userDataService;
     _        = this.GetExposureNotificationConfig();
     userData = userDataService.Get();
     userDataService.UserDataChanged += OnUserDataChanged;
     StartTimer();
 }
        public ExposureNotificationHandler()
        {
            this.httpDataService = Xamarin.Forms.DependencyService.Resolve <HttpDataService>();
            this.userDataService = Xamarin.Forms.DependencyService.Resolve <UserDataService>();

            userData = this.userDataService.Get();

            configuration = new Configuration
            {
                MinimumRiskScore                = 1,
                AttenuationWeight               = 50,
                TransmissionWeight              = 50,
                DurationWeight                  = 50,
                DaysSinceLastExposureWeight     = 50,
                TransmissionRiskScores          = new int[] { 1, 2, 3, 4, 5, 6, 7, 8 },
                AttenuationScores               = new[] { 1, 2, 3, 4, 5, 6, 7, 8 },
                DurationScores                  = new[] { 1, 2, 3, 4, 5, 6, 7, 8 },
                DaysSinceLastExposureScores     = new[] { 1, 2, 3, 4, 5, 6, 7, 8 },
                DurationAtAttenuationThresholds = new[] { 50, 70 }
            };
        }