Ejemplo n.º 1
0
        private async Task stopTimeEntry(TimeEntryStopOrigin origin)
        {
            OnboardingStorage.StopButtonWasTapped();

            await interactorFactory
            .StopTimeEntry(TimeService.CurrentDateTime, origin)
            .Execute()
            .Do(_ => intentDonationService.DonateStopCurrentTimeEntry())
            .Do(dataSource.SyncManager.InitiatePushSync);
        }
Ejemplo n.º 2
0
        private IObservable <Unit> stopTimeEntry(TimeEntryStopOrigin origin)
        {
            OnboardingStorage.StopButtonWasTapped();

            return(interactorFactory
                   .StopTimeEntry(TimeService.CurrentDateTime, origin)
                   .Execute()
                   .SubscribeOn(schedulerProvider.BackgroundScheduler)
                   .Do(syncManager.InitiatePushSync)
                   .SelectUnit());
        }
Ejemplo n.º 3
0
        public StopTimeEntryInteractor(
            ITimeService timeService,
            IObservableDataSource <IThreadSafeTimeEntry, IDatabaseTimeEntry> dataSource,
            DateTimeOffset stopTime,
            IAnalyticsService analyticsService,
            TimeEntryStopOrigin origin)
        {
            Ensure.Argument.IsNotNull(stopTime, nameof(stopTime));
            Ensure.Argument.IsNotNull(dataSource, nameof(dataSource));
            Ensure.Argument.IsNotNull(timeService, nameof(timeService));
            Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService));
            Ensure.Argument.IsNotNull(origin, nameof(origin));

            this.stopTime         = stopTime;
            this.dataSource       = dataSource;
            this.timeService      = timeService;
            this.analyticsService = analyticsService;
            this.origin           = origin;
        }
Ejemplo n.º 4
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > StopTimeEntry(DateTimeOffset currentDateTime, TimeEntryStopOrigin origin)
 => new StopTimeEntryInteractor(timeService, dataSource.TimeEntries, currentDateTime, analyticsService, origin);
Ejemplo n.º 5
0
 public StopTimerEntryEvent(TimeEntryStopOrigin origin)
 {
     Origin = origin;
 }