Refactor namespaces to EnvelopeGenerator.Server
Renamed namespaces and related identifiers from EnvelopeGenerator.WebUI to EnvelopeGenerator.Server across the project. This change affects data models, services, controllers, and configuration files to ensure consistency with the new architecture. Updated @using directives in Razor components and other files to reflect the new namespace structure. Adjusted project references in EnvelopeGenerator.Server.csproj to point to the new EnvelopeGenerator.Server.Client project. Modified middleware and logging configurations to use the new EnvelopeGenerator.Server namespace, including changes in Program.cs and appsettings.json. Updated resource and file references to use the new EnvelopeGenerator.Server path, ensuring correct resource loading. Adjusted configuration options in Program.cs to use the new namespace for options classes, such as ApiOptions and PdfViewerOptions. Updated authentication scheme names and related constants to align with the new namespace structure. Revised comments and documentation to reflect the new namespace, ensuring clarity and consistency in the codebase.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
public class Adjustment
|
||||
{
|
||||
public static Adjustment CreateBalanceForward(DateTime dt, int random)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using DevExpress.DataAccess.Sql;
|
||||
using DevExpress.DataAccess.Sql.DataApi;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
public class Customer {
|
||||
static List<Customer> currentCustomers = new List<Customer>();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
public class DataItem {
|
||||
static readonly string[] accountType = new string[] { "Energy", "Manufacturing", "Estate", "Food", "Services" };
|
||||
public string CustomerID { get; set; }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
public class DataItemList : IList<DataItem>, IList {
|
||||
readonly int rowCount;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
class DeterministicRandom {
|
||||
const int randomCount = 10000;
|
||||
static readonly int[] deterministicRandomNumbers;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Data {
|
||||
namespace EnvelopeGenerator.Server.Client.Data {
|
||||
public struct Term {
|
||||
public static readonly Term[] Terms = new Term[] {
|
||||
new Term("Payment seven days after invoice date" ),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@using EnvelopeGenerator.WebUI.Client.Services;
|
||||
@using EnvelopeGenerator.Server.Client.Services;
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<div class="page">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models;
|
||||
namespace EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a pre-assigned signature annotation position on a specific page.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models.Constants
|
||||
namespace EnvelopeGenerator.Server.Client.Models.Constants
|
||||
{
|
||||
public enum SenderAppType
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models.Constants;
|
||||
namespace EnvelopeGenerator.Server.Client.Models.Constants;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the unit of measurement for coordinate values in signature positioning.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models;
|
||||
namespace EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Client-side model for the envelope receiver returned by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models;
|
||||
namespace EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a captured signature with metadata created by the receiver in the signature popup.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using EnvelopeGenerator.WebUI.Client.Models.Constants;
|
||||
using EnvelopeGenerator.Server.Client.Models.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Models;
|
||||
namespace EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a signature position on a PDF page.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Options;
|
||||
namespace EnvelopeGenerator.Server.Client.Options;
|
||||
|
||||
public class ApiOptions
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Options;
|
||||
namespace EnvelopeGenerator.Server.Client.Options;
|
||||
|
||||
public class PdfViewerOptions
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/envelope/login/{EnvelopeKey}"
|
||||
@rendermode InteractiveWebAssembly
|
||||
@using EnvelopeGenerator.WebUI.Client.Services
|
||||
@using EnvelopeGenerator.Server.Client.Services
|
||||
@inject AuthService AuthService
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@page "/sender/login"
|
||||
@rendermode InteractiveWebAssembly
|
||||
@using EnvelopeGenerator.WebUI.Client.Services
|
||||
@using EnvelopeGenerator.Server.Client.Services
|
||||
@inject AuthService AuthService
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using DevExpress.XtraReports.UI;
|
||||
namespace EnvelopeGenerator.WebUI.Client.PredefinedReports {
|
||||
namespace EnvelopeGenerator.Server.Client.PredefinedReports {
|
||||
public class Report : XtraReport {
|
||||
private TopMarginBand topMarginBand1;
|
||||
private XRPageInfo xrPageInfo4;
|
||||
@@ -1081,7 +1081,7 @@ namespace EnvelopeGenerator.WebUI.Client.PredefinedReports {
|
||||
objectConstructorInfo1.Parameters.AddRange(new DevExpress.DataAccess.ObjectBinding.Parameter[] {
|
||||
parameter1});
|
||||
this.objectDataSource1.Constructor = objectConstructorInfo1;
|
||||
this.objectDataSource1.DataSource = typeof(EnvelopeGenerator.WebUI.Client.Data.DataItemList);
|
||||
this.objectDataSource1.DataSource = typeof(EnvelopeGenerator.Server.Client.Data.DataItemList);
|
||||
this.objectDataSource1.Name = "objectDataSource1";
|
||||
//
|
||||
// Title
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.PredefinedReports {
|
||||
namespace EnvelopeGenerator.Server.Client.PredefinedReports {
|
||||
public static class ReportsFactory
|
||||
{
|
||||
public static readonly Dictionary<string, Func<XtraReport>> Reports = new() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using EnvelopeGenerator.WebUI.Client.Services;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Services;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using DevExpress.Blazor.Reporting;
|
||||
using DevExpress.XtraReports.Web.Extensions;
|
||||
using DevExpress.DataAccess.Web;
|
||||
@@ -8,7 +8,7 @@ using DevExpress.XtraReports.Services;
|
||||
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
// HTTP Client (uses WebUI's YARP proxy)
|
||||
// HTTP Client (uses Server's YARP proxy)
|
||||
builder.Services.AddScoped(sp => new HttpClient {
|
||||
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
|
||||
});
|
||||
@@ -41,8 +41,8 @@ builder.Services.AddScoped<IDataSourceWizardJsonConnectionStorage, CustomDataSou
|
||||
builder.Services.AddScoped<IJsonDataConnectionProviderFactory, CustomJsonDataConnectionProviderFactory>();
|
||||
builder.Services.AddScoped<IObjectDataSourceWizardTypeProvider, ObjectDataSourceWizardCustomTypeProvider>();
|
||||
|
||||
DevExpress.Utils.DeserializationSettings.RegisterTrustedClass(typeof(EnvelopeGenerator.WebUI.Client.Data.DataItemList));
|
||||
DevExpress.Utils.DeserializationSettings.RegisterTrustedClass(typeof(EnvelopeGenerator.WebUI.Client.PredefinedReports.Report));
|
||||
DevExpress.Utils.DeserializationSettings.RegisterTrustedClass(typeof(EnvelopeGenerator.Server.Client.Data.DataItemList));
|
||||
DevExpress.Utils.DeserializationSettings.RegisterTrustedClass(typeof(EnvelopeGenerator.Server.Client.PredefinedReports.Report));
|
||||
|
||||
builder.Services.AddSingleton<InMemoryReportStorageWebExtension>();
|
||||
builder.Services.AddSingleton<ReportStorageWebExtension>(sp => sp.GetRequiredService<InMemoryReportStorageWebExtension>());
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using EnvelopeGenerator.WebUI.Client.Models;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Models;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves annotation positions from the API.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Provides application version for cache busting static assets.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public enum EnvelopeLoginResult { Success, InvalidCode, NotFound, Error }
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using DevExpress.DataAccess.Web;
|
||||
using DevExpress.DataAccess.Wizard.Services;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class CustomDataSourceWizardJsonDataConnectionStorage : IDataSourceWizardJsonConnectionStorage
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using DevExpress.DataAccess.Json;
|
||||
using DevExpress.DataAccess.Web;
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class CustomJsonDataConnectionProviderFactory : IJsonDataConnectionProviderFactory {
|
||||
public IJsonDataConnectionProviderService Create() {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DevExpress.XtraReports.UI;
|
||||
using DevExpress.XtraReports.Services;
|
||||
using EnvelopeGenerator.WebUI.Client.PredefinedReports;
|
||||
using EnvelopeGenerator.Server.Client.PredefinedReports;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class CustomReportProvider : IReportProviderAsync {
|
||||
private readonly InMemoryReportStorageWebExtension reportStorage;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Microsoft.Extensions.Options;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class DocumentService(HttpClient http, IOptions<ApiOptions> apiOptions)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using System.Net;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using EnvelopeGenerator.WebUI.Client.Models;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Models;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the <see cref="EnvelopeReceiverDto"/> for the authenticated receiver
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using DevExpress.Drawing;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public static class FontLoader {
|
||||
public async static Task LoadFonts(HttpClient httpClient, List<string> fontNames) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using DevExpress.XtraReports.UI;
|
||||
using DevExpress.XtraReports.Web.Extensions;
|
||||
using EnvelopeGenerator.WebUI.Client.PredefinedReports;
|
||||
using EnvelopeGenerator.Server.Client.PredefinedReports;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class InMemoryReportStorageWebExtension : ReportStorageWebExtension
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using DevExpress.DataAccess.Web;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class ObjectDataSourceWizardCustomTypeProvider : IObjectDataSourceWizardTypeProvider {
|
||||
public IEnumerable<Type> GetAvailableTypes(string context) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Net.Http.Json;
|
||||
using Microsoft.Extensions.Options;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.WebUI.Client.Models;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Client service for managing cached signatures via API.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using EnvelopeGenerator.WebUI.Client.Models;
|
||||
using EnvelopeGenerator.WebUI.Client.Options;
|
||||
using EnvelopeGenerator.Server.Client.Models;
|
||||
using EnvelopeGenerator.Server.Client.Options;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace EnvelopeGenerator.WebUI.Client.Services;
|
||||
namespace EnvelopeGenerator.Server.Client.Services;
|
||||
|
||||
public class SignatureService(HttpClient http, IOptions<ApiOptions> apiOptions)
|
||||
{
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using EnvelopeGenerator.WebUI.Client
|
||||
@using EnvelopeGenerator.WebUI.Client.Services
|
||||
@using EnvelopeGenerator.WebUI.Client.Models
|
||||
@using EnvelopeGenerator.WebUI.Client.Options
|
||||
@using EnvelopeGenerator.Server.Client
|
||||
@using EnvelopeGenerator.Server.Client.Services
|
||||
@using EnvelopeGenerator.Server.Client.Models
|
||||
@using EnvelopeGenerator.Server.Client.Options
|
||||
@using DevExpress.Blazor
|
||||
@using DevExpress.Blazor.PdfViewer
|
||||
@using DevExpress.Blazor.Reporting
|
||||
|
||||
Reference in New Issue
Block a user