Refactor project structure in solution
Replaced "EnvelopeGenerator.WebUI" with "EnvelopeGenerator.Server" and "EnvelopeGenerator.WebUI.Client" with "EnvelopeGenerator.Server.Client". Updated project entries, solution configuration platforms, and nested projects to reflect these changes.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using DevExpress.XtraReports.UI;
|
||||
using DevExpress.XtraReports.Services;
|
||||
using EnvelopeGenerator.WebUI.Client.PredefinedReports;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
|
||||
public class CustomReportProvider : IReportProviderAsync {
|
||||
private readonly InMemoryReportStorageWebExtension reportStorage;
|
||||
|
||||
public CustomReportProvider(InMemoryReportStorageWebExtension reportStorage) {
|
||||
this.reportStorage = reportStorage;
|
||||
}
|
||||
|
||||
public Task<XtraReport> GetReportAsync(string id, ReportProviderContext context) {
|
||||
if(reportStorage.TryGetReport(id, out var savedReport))
|
||||
return Task.FromResult(savedReport);
|
||||
|
||||
return Task.FromResult(ReportsFactory.GetReport(id));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user