private void loadReport(IThreadSafeWorkspace workspace, DateTimeOffset startDate, DateTimeOffset endDate, ReportsSource source) { if (this.startDate == startDate && this.endDate == endDate && workspaceId == workspace.Id) { return; } workspaceId = workspace.Id; this.workspace = workspace; this.startDate = startDate; this.endDate = endDate; this.source = source; workspaceSubject.OnNext(workspace); startDateSubject.OnNext(startDate); endDateSubject.OnNext(endDate); updateCurrentDateRangeString(); reportSubject.OnNext(Unit.Default); }
public ReportsDateRangeParameter WithSource(ReportsSource source) { return(new ReportsDateRangeParameter { StartDate = this.StartDate, EndDate = this.EndDate, Source = source }); }
public async Task LoadReport(long?workspaceId, DateTimeOffset startDate, DateTimeOffset endDate, ReportsSource source) { var getWorkspaceInteractor = workspaceId.HasValue ? interactorFactory.GetWorkspaceById(this.workspaceId) : interactorFactory.GetDefaultWorkspace(); var workspace = await getWorkspaceInteractor.Execute(); loadReport(workspace, startDate, endDate, source); }