예제 #1
0
 public FocusExternalDataService(ICalendarServiceClient calendarServiceClient,
                                 ITravelServiceClient travelServiceClient, IFocusStore focusStore)
 {
     _calendarServiceClient = calendarServiceClient;
     _travelServiceClient   = travelServiceClient;
     _focusStore            = focusStore;
 }
예제 #2
0
 public FocusGeofenceService(IDigitLogger logger,
                             ILocationStore locationStore, IFocusStore focusStore)
 {
     _logger        = logger;
     _locationStore = locationStore;
     _focusStore    = focusStore;
 }
예제 #3
0
 public PushSyncService(IPushSyncStore pushSyncStore, IDigitPushServiceClient digitPushServiceClient,
                        IFocusStore focusStore)
 {
     this.pushSyncStore      = pushSyncStore;
     _digitPushServiceClient = digitPushServiceClient;
     _focusStore             = focusStore;
 }
예제 #4
0
 public PlannerService(IFocusCalendarSyncService focusCalendarSyncService, ITravelServiceClient travelServiceClient,
     IFocusStore focusStore)
 {
     _focusCalendarSyncService = focusCalendarSyncService;
     _travelServiceClient = travelServiceClient;
     _focusStore = focusStore;
 }
 public FocusDirectionsService(IFocusStore focusStore, IFocusPatchService focusService,
                               ITravelServiceClient travelServiceClient)
 {
     _focusStore          = focusStore;
     _focusService        = focusService;
     _travelServiceClient = travelServiceClient;
 }
예제 #6
0
 public DeviceDataService(IFocusStore focusStore,
                          IDeviceSyncStore deviceSyncStore,
                          ICalendarServiceClient calendarServiceClient,
                          ITravelServiceClient travelServiceClient)
 {
     _focusStore            = focusStore;
     _deviceSyncStore       = deviceSyncStore;
     _calendarServiceClient = calendarServiceClient;
     _travelServiceClient   = travelServiceClient;
 }
예제 #7
0
 public FocusService(IDigitLogger logger,
                     IFocusCalendarSyncService focusCalendarSyncService,
                     ILocationService locationService,
                     IFocusUpdateService focusUpdateService,
                     IFocusNotificationService focusNotificationService,
                     IFocusStore focusStore)
 {
     this.logger = logger;
     this.focusCalendarSyncService = focusCalendarSyncService;
     this.locationService          = locationService;
     this.focusUpdateService       = focusUpdateService;
     _focusNotificationService     = focusNotificationService;
     _focusStore = focusStore;
 }
예제 #8
0
 public FocusNotificationService(IFocusStore focusStore,
                                 IDigitLogger logger,
                                 IButler butler,
                                 IOptions <DigitServiceOptions> optionsAccessor,
                                 IDigitPushServiceClient digitPushServiceClient,
                                 IFocusExternalDataService focusExternalDataService)
 {
     _focusStore               = focusStore;
     _logger                   = logger;
     _butler                   = butler;
     _digitPushServiceClient   = digitPushServiceClient;
     _focusExternalDataService = focusExternalDataService;
     options                   = optionsAccessor.Value;
 }
        public static async Task <FocusItem> GetActiveItem(this IFocusStore focusStore, string userId)
        {
            FocusItem[] items = await focusStore.GetActiveAsync(userId);

            var query = items.Where(v => v.IndicateTime - DateTimeOffset.Now < FocusConstants.ItemActiveBeforeIndicateAlone);

            if (query.Count() == 1)
            {
                return(query.Single());
            }
            return(items
                   .Where(v => v.IndicateTime - DateTimeOffset.Now < FocusConstants.ItemActiveBeforeIndicateMultiple)
                   .OrderByDescending(v => v.IndicateTime)
                   .FirstOrDefault());
        }
예제 #10
0
 public FocusUpdateService(IFocusStore focusStore,
                           ICalendarServiceClient calendarServiceClient,
                           ITravelServiceClient travelServiceClient,
                           IDigitLogger logger,
                           IEnumerable <IFocusSubscriber> focusSubscribers,
                           IFocusGeofenceService focusGeofenceService,
                           IOptions <DigitServiceOptions> options)
 {
     this.focusStore            = focusStore;
     this.calendarServiceClient = calendarServiceClient;
     this.travelServiceClient   = travelServiceClient;
     this.logger           = logger;
     this.focusSubscribers = focusSubscribers;
     _focusGeofenceService = focusGeofenceService;
     _options = options.Value;
 }
예제 #11
0
 public FocusController(IFocusStore focusStore, IFocusService focusService)
 {
     this.focusStore   = focusStore;
     this.focusService = focusService;
 }
예제 #12
0
 public FocusCalendarSyncService(ICalendarServiceClient calendarServiceClient,
                                 IFocusStore focusStore)
 {
     this.calendarServiceClient = calendarServiceClient;
     this.focusStore            = focusStore;
 }