public void ConfigureServices()

in src/Relecloud.Web.CallCenter/Startup.cs [39:66]


        public void ConfigureServices(IServiceCollection services, TokenCredential token)
        {
            services.AddHttpContextAccessor();
            services.Configure<RelecloudApiOptions>(Configuration.GetSection("App:RelecloudApi"));
            services.AddOptions();
            AddMicrosoftEntraIdServices(services);
            services.AddControllersWithViews();

            if (Configuration["App:ApplicationInsights:ConnectionString"] is string appInsightsConnectionString)
            {
                // Normally, AppInsights services wouldn't need to also be registered alongside OpenTelemetry services.
                // But this application uses custom AppInsights events which are currently not possible to send with the
                // Azure Monitor OpenTelemetry distro.
                services.AddApplicationInsightsTelemetry(o => o.ConnectionString = appInsightsConnectionString);
                AddOpenTelemetry(services, appInsightsConnectionString);
            }

            AddConcertContextService(services);
            AddConcertSearchService(services);
            AddTicketPurchaseService(services);
            AddTicketImageService(services);
            AddAzureCacheForRedis(services, token);
            services.AddHealthChecks();

            // Add support for session state.
            // NOTE: If there is a distibuted cache service (e.g. Redis) then this will be used to store session data.
            services.AddSession();
        }