private static async Task LoadSecretSettings(
            QueueStorageSettings queueStorageSettings,
            AppSettings appSettings,
            KeyVaultSettings keyVaultSettings)
        {
            var store = new SecretsStore(appSettings.KeyVaultBaseUrl, keyVaultSettings.ClientId, keyVaultSettings.ClientSecret);

            queueStorageSettings.ConnectionString = await store.GetOrLoadSettingAsync(queueStorageSettings.ConnectionString);
        }
        private static void ConfigureSettings(HostBuilderContext hostContext, IServiceCollection services)
        {
            var queueStorageSettings = new QueueStorageSettings();
            var appSettings          = new AppSettings();
            var keyVaultSettings     = new KeyVaultSettings();

            hostContext.Configuration.GetSection(nameof(AppSettings)).Bind(appSettings);
            hostContext.Configuration.GetSection(nameof(QueueStorageSettings)).Bind(queueStorageSettings);
            hostContext.Configuration.GetSection(nameof(KeyVaultSettings)).Bind(keyVaultSettings);

            LoadSecretSettings(queueStorageSettings, appSettings, keyVaultSettings)
            .GetAwaiter()
            .GetResult();

            services.AddSingleton(queueStorageSettings);
            services.AddSingleton(appSettings);
        }