Browse Source

Remove Program.AppName

davidfowl/common-services
Reuben Bond 1 year ago
parent
commit
da024f9812
6 changed files with 2 additions and 30 deletions
  1. +2
    -3
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs
  2. +0
    -6
      src/Services/Ordering/Ordering.BackgroundTasks/Program.cs
  3. +0
    -5
      src/Services/Ordering/Ordering.SignalrHub/Program.cs
  4. +0
    -5
      src/Services/Payment/Payment.API/Program.cs
  5. +0
    -5
      src/Web/WebMVC/Program.cs
  6. +0
    -6
      src/Web/WebStatus/Program.cs

+ 2
- 3
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs View File

@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
@ -12,7 +12,6 @@ public class EventBusServiceBus : IEventBus, IAsyncDisposable
private readonly string _subscriptionName; private readonly string _subscriptionName;
private readonly ServiceBusSender _sender; private readonly ServiceBusSender _sender;
private readonly ServiceBusProcessor _processor; private readonly ServiceBusProcessor _processor;
private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus";
private const string INTEGRATION_EVENT_SUFFIX = "IntegrationEvent"; private const string INTEGRATION_EVENT_SUFFIX = "IntegrationEvent";
public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConnection, public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConnection,
@ -198,4 +197,4 @@ public class EventBusServiceBus : IEventBus, IAsyncDisposable
_subsManager.Clear(); _subsManager.Clear();
await _processor.CloseAsync(); await _processor.CloseAsync();
} }
}
}

+ 0
- 6
src/Services/Ordering/Ordering.BackgroundTasks/Program.cs View File

@ -34,9 +34,3 @@ app.MapHealthChecks("/liveness", new HealthCheckOptions
}); });
await app.RunAsync(); await app.RunAsync();
public partial class Program
{
public static string Namespace = typeof(Program).Assembly.GetName().Name;
public static string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1);
}

+ 0
- 5
src/Services/Ordering/Ordering.SignalrHub/Program.cs View File

@ -196,11 +196,6 @@ void RegisterEventBus(IServiceCollection services, IConfiguration configuration)
services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>(); services.AddSingleton<IEventBusSubscriptionsManager, InMemoryEventBusSubscriptionsManager>();
} }
public partial class Program
{
public static string Namespace = typeof(Program).Assembly.GetName().Name;
public static string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1);
}
public static class CustomExtensionMethods public static class CustomExtensionMethods
{ {
public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration) public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration)


+ 0
- 5
src/Services/Payment/Payment.API/Program.cs View File

@ -129,11 +129,6 @@ void ConfigureEventBus(IApplicationBuilder app)
eventBus.Subscribe<OrderStatusChangedToStockConfirmedIntegrationEvent, OrderStatusChangedToStockConfirmedIntegrationEventHandler>(); eventBus.Subscribe<OrderStatusChangedToStockConfirmedIntegrationEvent, OrderStatusChangedToStockConfirmedIntegrationEventHandler>();
} }
public partial class Program
{
public static string Namespace = typeof(Program).Assembly.GetName().Name;
public static string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1);
}
public static class CustomExtensionMethods public static class CustomExtensionMethods
{ {
public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration) public static IServiceCollection AddCustomHealthCheck(this IServiceCollection services, IConfiguration configuration)


+ 0
- 5
src/Web/WebMVC/Program.cs View File

@ -149,8 +149,3 @@ static void AddCustomAuthentication(WebApplicationBuilder builder)
options.Scope.Add("webhooks"); options.Scope.Add("webhooks");
}); });
} }
public partial class Program
{
public static readonly string AppName = typeof(Program).Assembly.GetName().Name;
}

+ 0
- 6
src/Web/WebStatus/Program.cs View File

@ -52,9 +52,3 @@ app.MapHealthChecks("/liveness", new HealthCheckOptions
}); });
await app.RunAsync(); await app.RunAsync();
public partial class Program
{
private static readonly string _namespace = typeof(Program).Assembly.GetName().Name;
public static readonly string AppName = _namespace;
}

Loading…
Cancel
Save