fix(WebUI.Client.Services): resolve doc comment icons

This commit is contained in:
2026-06-15 10:27:51 +02:00
parent d6bafc64a6
commit 207992d95a
7 changed files with 85 additions and 88 deletions

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.ReceiverUI.Models; namespace EnvelopeGenerator.WebUI.Client.Models;
/// <summary> /// <summary>
/// Represents a captured signature with metadata created by the receiver in the signature popup. /// Represents a captured signature with metadata created by the receiver in the signature popup.

View File

@@ -12,7 +12,7 @@ namespace EnvelopeGenerator.WebUI.Client.Services;
/// During development, <c>BaseUrl</c> is empty so the request resolves to the /// During development, <c>BaseUrl</c> is empty so the request resolves to the
/// YARP-proxied route on the same origin, which currently serves /// YARP-proxied route on the same origin, which currently serves
/// <c>fake-data/annotations.json</c>. To switch to real data, update the /// <c>fake-data/annotations.json</c>. To switch to real data, update the
/// YARP route in <c>yarp.json</c> no code change required. /// YARP route in <c>yarp.json</c> no code change required.
/// </summary> /// </summary>
[Obsolete("Use SignatureService.")] [Obsolete("Use SignatureService.")]
public class AnnotationService(HttpClient http, IOptions<ApiOptions> apiOptions) public class AnnotationService(HttpClient http, IOptions<ApiOptions> apiOptions)

View File

@@ -1,40 +1,39 @@
using DevExpress.DataAccess.Json; using DevExpress.DataAccess.Json;
using DevExpress.DataAccess.Web; using DevExpress.DataAccess.Web;
using DevExpress.DataAccess.Wizard.Services; using DevExpress.DataAccess.Wizard.Services;
namespace EnvelopeGenerator.WebUI.Client.Services namespace EnvelopeGenerator.WebUI.Client.Services;
public class CustomDataSourceWizardJsonDataConnectionStorage : IDataSourceWizardJsonConnectionStorage
{ {
public class CustomDataSourceWizardJsonDataConnectionStorage : IDataSourceWizardJsonConnectionStorage public static JsonDataConnection GetDefaultConnection() {
{ var uriJsonSource = new UriJsonSource() {
public static JsonDataConnection GetDefaultConnection() { Uri = new Uri(@"https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"),
var uriJsonSource = new UriJsonSource() { };
Uri = new Uri(@"https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"), return new JsonDataConnection(uriJsonSource) { StoreConnectionNameOnly = true, Name = "NWindProductsJson" };
};
return new JsonDataConnection(uriJsonSource) { StoreConnectionNameOnly = true, Name = "NWindProductsJson" };
}
public static List<JsonDataConnection> GetConnections() {
var connections = new List<JsonDataConnection> {
GetDefaultConnection()
};
return connections;
}
bool IJsonConnectionStorageService.CanSaveConnection => false;
bool IJsonConnectionStorageService.ContainsConnection(string connectionName) {
return GetConnections().Any(x => x.Name == connectionName);
}
IEnumerable<JsonDataConnection> IJsonConnectionStorageService.GetConnections() {
return GetConnections();
}
JsonDataConnection IJsonDataConnectionProviderService.GetJsonDataConnection(string name) {
var connection = GetConnections().FirstOrDefault(x => x.Name == name);
if(connection == null)
throw new InvalidOperationException();
return connection;
}
void IJsonConnectionStorageService.SaveConnection(string connectionName, JsonDataConnection connection, bool saveCredentials) { }
} }
} public static List<JsonDataConnection> GetConnections() {
var connections = new List<JsonDataConnection> {
GetDefaultConnection()
};
return connections;
}
bool IJsonConnectionStorageService.CanSaveConnection => false;
bool IJsonConnectionStorageService.ContainsConnection(string connectionName) {
return GetConnections().Any(x => x.Name == connectionName);
}
IEnumerable<JsonDataConnection> IJsonConnectionStorageService.GetConnections() {
return GetConnections();
}
JsonDataConnection IJsonDataConnectionProviderService.GetJsonDataConnection(string name) {
var connection = GetConnections().FirstOrDefault(x => x.Name == name);
if(connection == null)
throw new InvalidOperationException();
return connection;
}
void IJsonConnectionStorageService.SaveConnection(string connectionName, JsonDataConnection connection, bool saveCredentials) { }
}

View File

@@ -1,24 +1,23 @@
using DevExpress.DataAccess.Json; using DevExpress.DataAccess.Json;
using DevExpress.DataAccess.Web; using DevExpress.DataAccess.Web;
namespace EnvelopeGenerator.WebUI.Client.Services namespace EnvelopeGenerator.WebUI.Client.Services;
{
public class CustomJsonDataConnectionProviderFactory : IJsonDataConnectionProviderFactory {
public IJsonDataConnectionProviderService Create() {
return new WebDocumentViewerJsonDataConnectionProvider(CustomDataSourceWizardJsonDataConnectionStorage.GetConnections());
}
}
public class WebDocumentViewerJsonDataConnectionProvider : IJsonDataConnectionProviderService public class CustomJsonDataConnectionProviderFactory : IJsonDataConnectionProviderFactory {
{ public IJsonDataConnectionProviderService Create() {
readonly List<JsonDataConnection> jsonDataConnections; return new WebDocumentViewerJsonDataConnectionProvider(CustomDataSourceWizardJsonDataConnectionStorage.GetConnections());
public WebDocumentViewerJsonDataConnectionProvider(List<JsonDataConnection> jsonDataConnections) {
this.jsonDataConnections = jsonDataConnections;
}
public JsonDataConnection GetJsonDataConnection(string name) {
var connection = jsonDataConnections.FirstOrDefault(x => x.Name == name);
if(connection == null)
throw new InvalidOperationException();
return connection;
}
} }
} }
public class WebDocumentViewerJsonDataConnectionProvider : IJsonDataConnectionProviderService
{
readonly List<JsonDataConnection> jsonDataConnections;
public WebDocumentViewerJsonDataConnectionProvider(List<JsonDataConnection> jsonDataConnections) {
this.jsonDataConnections = jsonDataConnections;
}
public JsonDataConnection GetJsonDataConnection(string name) {
var connection = jsonDataConnections.FirstOrDefault(x => x.Name == name);
if(connection == null)
throw new InvalidOperationException();
return connection;
}
}

View File

@@ -1,21 +1,20 @@
using DevExpress.XtraReports.UI; using DevExpress.XtraReports.UI;
using DevExpress.XtraReports.Services; using DevExpress.XtraReports.Services;
using EnvelopeGenerator.WebUI.Client.PredefinedReports; using EnvelopeGenerator.WebUI.Client.PredefinedReports;
namespace EnvelopeGenerator.WebUI.Client.Services namespace EnvelopeGenerator.WebUI.Client.Services;
{
public class CustomReportProvider : IReportProviderAsync {
private readonly InMemoryReportStorageWebExtension reportStorage;
public CustomReportProvider(InMemoryReportStorageWebExtension reportStorage) { public class CustomReportProvider : IReportProviderAsync {
this.reportStorage = reportStorage; private readonly InMemoryReportStorageWebExtension reportStorage;
}
public Task<XtraReport> GetReportAsync(string id, ReportProviderContext context) { public CustomReportProvider(InMemoryReportStorageWebExtension reportStorage) {
if(reportStorage.TryGetReport(id, out var savedReport)) this.reportStorage = reportStorage;
return Task.FromResult(savedReport);
return Task.FromResult(ReportsFactory.GetReport(id));
}
} }
}
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));
}
}

View File

@@ -1,12 +1,12 @@
using DevExpress.Drawing; using DevExpress.Drawing;
namespace EnvelopeGenerator.WebUI.Client.Services { namespace EnvelopeGenerator.WebUI.Client.Services;
public static class FontLoader {
public async static Task LoadFonts(HttpClient httpClient, List<string> fontNames) { public static class FontLoader {
foreach(var fontName in fontNames) { public async static Task LoadFonts(HttpClient httpClient, List<string> fontNames) {
var fontBytes = await httpClient.GetByteArrayAsync($"fonts/{fontName}"); foreach(var fontName in fontNames) {
DXFontRepository.Instance.AddFont(fontBytes); var fontBytes = await httpClient.GetByteArrayAsync($"fonts/{fontName}");
} DXFontRepository.Instance.AddFont(fontBytes);
} }
} }
} }

View File

@@ -1,9 +1,9 @@
using DevExpress.DataAccess.Web; using DevExpress.DataAccess.Web;
namespace EnvelopeGenerator.WebUI.Client.Services { namespace EnvelopeGenerator.WebUI.Client.Services;
public class ObjectDataSourceWizardCustomTypeProvider : IObjectDataSourceWizardTypeProvider {
public IEnumerable<Type> GetAvailableTypes(string context) { public class ObjectDataSourceWizardCustomTypeProvider : IObjectDataSourceWizardTypeProvider {
return new[] { typeof(Data.DataItemList) }; public IEnumerable<Type> GetAvailableTypes(string context) {
} return new[] { typeof(Data.DataItemList) };
} }
} }