From 9847b6e6f71b1ef99f8349081a4c5a8a19b30705 Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Thu, 12 Jun 2025 19:18:17 +0200 Subject: [PATCH] Change assembly name constant spelling --- .../Common/DependencyInjectionExtensions.cs | 7 +++++-- src/Vegasco.Server.AppHost.Shared/Constants.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs index 539aef2..a36b59b 100644 --- a/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs +++ b/src/Vegasco.Server.Api/Common/DependencyInjectionExtensions.cs @@ -29,10 +29,13 @@ public static class DependencyInjectionExtensions private static IServiceCollection AddMiscellaneousServices(this IServiceCollection services) { - var assemblyName = Assembly.GetExecutingAssembly() + services.AddSingleton(sp => + { + var assemblyName = Assembly.GetExecutingAssembly() .GetName() .Name ?? "Vegasco.Server.Api"; - services.AddSingleton(new ActivitySource(assemblyName)); + return new ActivitySource(assemblyName); + }); services.AddResponseCompression(); diff --git a/src/Vegasco.Server.AppHost.Shared/Constants.cs b/src/Vegasco.Server.AppHost.Shared/Constants.cs index 9c1dc4c..74e2769 100644 --- a/src/Vegasco.Server.AppHost.Shared/Constants.cs +++ b/src/Vegasco.Server.AppHost.Shared/Constants.cs @@ -4,7 +4,7 @@ public static class Constants { public static class Projects { - public const string Api = "Vegasco_Server_Api"; + public const string Api = "Vegasco.Server.Api"; } public static class Database