public ReportsProvider(ITogglApi api, ITogglDatabase database) { Ensure.Argument.IsNotNull(api, nameof(api)); Ensure.Argument.IsNotNull(database, nameof(database)); projectsApi = api.Projects; projectsRepository = database.Projects; clientsRepository = database.Clients; projectSummaryApi = api.ProjectsSummary; timeEntriesReportsApi = api.TimeEntriesReports; }
public GetTotalsInteractor( ITimeEntriesReportsApi api, long userId, long workspaceId, DateTimeOffset startDate, DateTimeOffset endDate) { Ensure.Argument.IsNotNull(api, nameof(api)); this.api = api; this.userId = userId; this.workspaceId = workspaceId; this.startDate = startDate; this.endDate = endDate; }
public GetProjectSummaryInteractor( ITogglApi api, ITogglDatabase database, IAnalyticsService analyticsService, ReportsMemoryCache memoryCache, long workspaceId, DateTimeOffset startDate, DateTimeOffset?endDate) : base(analyticsService) { Ensure.Argument.IsNotNull(api, nameof(api)); Ensure.Argument.IsNotNull(database, nameof(database)); projectsApi = api.Projects; projectsRepository = database.Projects; clientsRepository = database.Clients; projectSummaryApi = api.ProjectsSummary; timeEntriesReportsApi = api.TimeEntriesReports; this.endDate = endDate; this.startDate = startDate; this.workspaceId = workspaceId; this.memoryCache = memoryCache; }