public void ConfigureServices()

in src/Relecloud.Web.CallCenter.Api/Startup.cs [42:81]


        public void ConfigureServices(IServiceCollection services)
        {
            var azureCredential = GetAzureCredential();

            // Add services to the container.
            AddMicrosoftEntraIdServices(services);

            services.AddControllers();

            services.AddAzureAppConfiguration();

            // Enable feature management for easily enabling or disabling
            // optional features like rendering tickets out-of-process.
            services.AddFeatureManagement();

            // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
            services.AddEndpointsApiExplorer();
            services.AddSwaggerGen();

            if (Configuration["App:ApplicationInsights:ConnectionString"] is string appInsightsConnectionString)
            {
                AddOpenTelemetry(services, appInsightsConnectionString);
            }

            // Add Azure Service Bus message bus.
            services.AddAzureServiceBusMessageBus("App:ServiceBus", azureCredential);

            AddAzureSearchService(services);
            AddConcertContextServices(services);
            AddDistributedSession(services, azureCredential);
            AddPaymentGatewayService(services);
            AddTicketManagementService(services);
            AddTicketImageService(services);

            // The ApplicationInitializer is injected in the Configure method with all its dependencies and will ensure
            // they are all properly initialized upon construction.
            services.AddScoped<ApplicationInitializer, ApplicationInitializer>();

            services.AddHealthChecks();
        }