Exemplo n.º 1
0
 public FocusGeofenceService(IDigitLogger logger,
                             ILocationStore locationStore, IFocusStore focusStore)
 {
     _logger        = logger;
     _locationStore = locationStore;
     _focusStore    = focusStore;
 }
Exemplo n.º 2
0
 public LocationStore(DigitServiceContext digitServiceContext, IUserRepository userRepository,
                      IDigitLogger logger)
 {
     this.digitServiceContext = digitServiceContext;
     this.userRepository      = userRepository;
     this.logger = logger;
 }
Exemplo n.º 3
0
 public DeviceController(IDigitLogger digitLogger,
                         IDeviceService deviceService, ILogReader logReader)
 {
     this.digitLogger   = digitLogger;
     this.deviceService = deviceService;
     _logReader         = logReader;
 }
 public DeviceSyncFocusSubscriber(IDigitPushServiceClient digitPushServiceClient, IDeviceSyncStore deviceSyncStore,
                                  IDigitLogger digitLogger)
 {
     _digitPushServiceClient = digitPushServiceClient;
     _deviceSyncStore        = deviceSyncStore;
     _digitLogger            = digitLogger;
 }
 public CallbackController(IUserService userService,
                           IDigitLogger digitLogger,
                           IFocusService focusService)
 {
     this.userService  = userService;
     this.digitLogger  = digitLogger;
     this.focusService = focusService;
 }
Exemplo n.º 6
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;
 }
Exemplo n.º 7
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;
 }
Exemplo n.º 8
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;
 }
Exemplo n.º 9
0
 public UserService(IUserRepository userRepository,
                    ICalendarServiceClient calendarService,
                    IButler butler,
                    IOptions <DigitServiceOptions> optionsAccessor,
                    IDigitLogger digitLogger,
                    IDigitPushServiceClient digitPushServiceClient,
                    ILogger <UserService> logger)
 {
     this.userRepository         = userRepository;
     this.calendarService        = calendarService;
     this.butler                 = butler;
     this.digitLogger            = digitLogger;
     this.digitPushServiceClient = digitPushServiceClient;
     _logger = logger;
     options = optionsAccessor.Value;
 }
Exemplo n.º 10
0
            public LocationUpdateReceived()
            {
                var locationStoreMock = new Mock<ILocationStore>(MockBehavior.Strict);
                locationStoreMock.Setup(v => v.GetActiveGeofenceRequests(userId, It.IsAny<DateTimeOffset>())).Returns(Task.FromResult(new GeofenceRequest[0]));
                locationStoreMock.Setup(v => v.AddGeofenceRequests(userId, It.IsAny<GeofenceRequest[]>())).Returns(Task.FromResult(new GeofenceRequest[0]));
                locationStoreMock.Setup(v => v.UpdateLocationAsync(userId, It.IsAny<Location>())).Returns(Task.CompletedTask);
                //locationStoreMock.Setup(v => v.SetGeofenceRequestedAsync(userId, It.IsAny<GeofenceRequest>())).Returns(Task.CompletedTask);
                //locationStoreMock.Setup(v => v.IsGeofenceActiveAsync(userId, It.IsAny<GeofenceRequest>())).Returns(Task.FromResult(false));
                //locationStoreMock.Setup(v => v.ClearGeofenceAsync(userId)).Returns(Task.CompletedTask);
                locationStoreMock.Setup(v => v.GetLastLocationAsync(userId)).Returns(Task.FromResult((Location)null));
                locationStore = locationStoreMock.Object;

                var pushSyncServiceMock = new Mock<IPushSyncService>(MockBehavior.Strict);
                pushSyncServiceMock.Setup(v => v.SetLocationRequestedExternal(It.IsAny<string>(), It.IsAny<DateTimeOffset>()))
                    .Returns(Task.CompletedTask);
                pushSyncServiceMock.Setup(v => v.SetLocationRequestDone(It.IsAny<string>()))
                    .Returns(Task.CompletedTask);
                pushSyncServiceMock.Setup(v => v.SetDone(It.IsAny<string>(), It.IsAny<string>()))
                    .Returns(Task.CompletedTask);
                logger = Mock.Of<IDigitLogger>();
                pushSyncService = pushSyncServiceMock.Object;
            }
Exemplo n.º 11
0
 public LocationController(IDigitLogger logger, IFocusService focusService)
 {
     this.logger       = logger;
     this.focusService = focusService;
 }
Exemplo n.º 12
0
 public static Task LogErrorForUser(this IDigitLogger digitLogger, string userId, string message,
                                    DigitTraceAction action = DigitTraceAction.Default,
                                    IDictionary <string, object> additionalData = null)
 {
     return(digitLogger.LogForUser(userId, message, action, additionalData, LogLevel.Error));
 }
Exemplo n.º 13
0
 public LocationService(IPushSyncService pushSyncService, ILocationStore locationStore, IDigitLogger logger)
 {
     this.pushSyncService = pushSyncService;
     this.locationStore   = locationStore;
     this.logger          = logger;
 }