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.
27 lines
914 B
C#
27 lines
914 B
C#
namespace EnvelopeGenerator.Server.Client.Services;
|
|
|
|
/// <summary>
|
|
/// Provides application version for cache busting static assets.
|
|
/// Version is automatically incremented on each build via AssemblyVersion.
|
|
/// </summary>
|
|
public class AppVersionService
|
|
{
|
|
/// <summary>
|
|
/// Current application version (e.g., "1.0.0.0")
|
|
/// </summary>
|
|
public string Version { get; }
|
|
|
|
public AppVersionService()
|
|
{
|
|
// Get version from assembly metadata
|
|
Version = typeof(AppVersionService).Assembly.GetName().Version?.ToString() ?? "1.0.0.0";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Generates versioned URL for static assets (cache busting)
|
|
/// </summary>
|
|
/// <param name="path">Asset path (e.g., "css/envelope-viewer.css")</param>
|
|
/// <returns>Versioned URL (e.g., "css/envelope-viewer.css?v=1.0.0.0")</returns>
|
|
public string GetVersionedUrl(string path) => $"{path}?v={Version}";
|
|
}
|