private async Task stopTimeEntry(TimeEntryStopOrigin origin) { OnboardingStorage.StopButtonWasTapped(); await interactorFactory .StopTimeEntry(TimeService.CurrentDateTime, origin) .Execute() .Do(_ => intentDonationService.DonateStopCurrentTimeEntry()) .Do(dataSource.SyncManager.InitiatePushSync); }
private IObservable <Unit> stopTimeEntry(TimeEntryStopOrigin origin) { OnboardingStorage.StopButtonWasTapped(); return(interactorFactory .StopTimeEntry(TimeService.CurrentDateTime, origin) .Execute() .SubscribeOn(schedulerProvider.BackgroundScheduler) .Do(syncManager.InitiatePushSync) .SelectUnit()); }
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; }
public IInteractor <IObservable <IThreadSafeTimeEntry> > StopTimeEntry(DateTimeOffset currentDateTime, TimeEntryStopOrigin origin) => new StopTimeEntryInteractor(timeService, dataSource.TimeEntries, currentDateTime, analyticsService, origin);
public StopTimerEntryEvent(TimeEntryStopOrigin origin) { Origin = origin; }