public CreateTimeEntryInteractor(
            IIdProvider idProvider,
            ITimeService timeService,
            ITogglDataSource dataSource,
            IAnalyticsService analyticsService,
            ITimeEntryPrototype prototype,
            DateTimeOffset startTime,
            TimeSpan?duration,
            TimeEntryStartOrigin origin)
        {
            Ensure.Argument.IsNotNull(origin, nameof(origin));
            Ensure.Argument.IsNotNull(prototype, nameof(prototype));
            Ensure.Argument.IsNotNull(idProvider, nameof(idProvider));
            Ensure.Argument.IsNotNull(dataSource, nameof(dataSource));
            Ensure.Argument.IsNotNull(timeService, nameof(timeService));
            Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService));

            this.origin           = origin;
            this.duration         = duration;
            this.prototype        = prototype;
            this.startTime        = startTime;
            this.idProvider       = idProvider;
            this.dataSource       = dataSource;
            this.timeService      = timeService;
            this.analyticsService = analyticsService;
        }
Exemplo n.º 2
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > CreateTimeEntry(ITimeEntryPrototype prototype)
 => new CreateTimeEntryInteractor(
     idProvider,
     timeService,
     dataSource,
     analyticsService,
     prototype,
     prototype.StartTime,
     prototype.Duration);
Exemplo n.º 3
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > ContinueTimeEntry(ITimeEntryPrototype prototype)
 => new CreateTimeEntryInteractor(
     idProvider,
     timeService,
     dataSource,
     analyticsService,
     prototype,
     timeService.CurrentDateTime,
     null,
     TimeEntryStartOrigin.Continue);
 public CreateTimeEntryInteractor(
     IIdProvider idProvider,
     ITimeService timeService,
     ITogglDataSource dataSource,
     IAnalyticsService analyticsService,
     ITimeEntryPrototype prototype,
     DateTimeOffset startTime,
     TimeSpan?duration)
     : this(idProvider, timeService, dataSource, analyticsService, prototype, startTime, duration,
            prototype.Duration.HasValue ? TimeEntryStartOrigin.Manual : TimeEntryStartOrigin.Timer)
 {
 }
Exemplo n.º 5
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > ContinueTimeEntry(ITimeEntryPrototype prototype, ContinueTimeEntryMode continueMode)
 => new CreateTimeEntryInteractor(
     idProvider,
     timeService,
     dataSource,
     analyticsService,
     intentDonationService,
     prototype,
     syncManager,
     timeService.CurrentDateTime,
     null,
     (TimeEntryStartOrigin)continueMode);
Exemplo n.º 6
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > CreateTimeEntry(ITimeEntryPrototype prototype, TimeEntryStartOrigin origin)
 => new CreateTimeEntryInteractor(
     idProvider,
     timeService,
     dataSource,
     analyticsService,
     intentDonationService,
     prototype,
     syncManager,
     prototype.StartTime,
     prototype.Duration,
     origin);
        public ContinueTimeEntryFromMainLogInteractor(
            IInteractorFactory interactorFactory,
            IAnalyticsService analyticsService,
            ITimeEntryPrototype timeEntryPrototype,
            ContinueTimeEntryMode continueMode,
            int indexInLog,
            int dayInLog,
            int daysInThePast)
        {
            Ensure.Argument.IsNotNull(interactorFactory, nameof(interactorFactory));
            Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService));
            Ensure.Argument.IsNotNull(timeEntryPrototype, nameof(timeEntryPrototype));
            Ensure.Argument.IsNotNull(continueMode, nameof(continueMode));

            this.interactorFactory  = interactorFactory;
            this.analyticsService   = analyticsService;
            this.timeEntryPrototype = timeEntryPrototype;
            this.continueMode       = continueMode;
            this.indexInLog         = indexInLog;
            this.dayInLog           = dayInLog;
            this.daysInThePast      = daysInThePast;
        }
Exemplo n.º 8
0
 public IInteractor <IObservable <IThreadSafeTimeEntry> > ContinueTimeEntryFromMainLog(ITimeEntryPrototype prototype,
                                                                                       ContinueTimeEntryMode continueMode, int indexInLog, int dayInLog, int daysInThePast)
 => new ContinueTimeEntryFromMainLogInteractor(
     this,
     analyticsService,
     prototype,
     continueMode,
     indexInLog,
     dayInLog,
     daysInThePast);