Skip to content

Commit fc38c44

Browse files
author
dragonfly91
committed
Removed app config code from ServiceClientAdapter
1 parent 199ef63 commit fc38c44

File tree

1 file changed

+1
-10
lines changed
  • src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.ServiceClientAdapter

1 file changed

+1
-10
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.ServiceClientAdapter/ServiceClientAdapter.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,17 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ServiceClient
2424
{
2525
public partial class ServiceClientAdapter
2626
{
27-
const string AppSettingsSectionName = "appSettings";
2827
const string RecoveryServicesResourceNamespace = "Microsoft.RecoveryServices";
29-
const string ProviderNamespaceKey = "ProviderNamespace";
3028
const string AzureFabricName = "Azure";
3129

3230
ClientProxy<RecoveryServicesNS.RecoveryServicesBackupManagementClient, RecoveryServicesModelsNS.CustomRequestHeaders> BmsAdapter;
3331

3432
public ServiceClientAdapter(SubscriptionCloudCredentials creds, Uri baseUri)
3533
{
36-
System.Configuration.Configuration exeConfiguration = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Reflection.Assembly.GetExecutingAssembly().Location);
37-
System.Configuration.AppSettingsSection appSettings = (System.Configuration.AppSettingsSection)exeConfiguration.GetSection(AppSettingsSectionName);
38-
string recoveryServicesResourceNamespace = RecoveryServicesResourceNamespace;
39-
if (appSettings.Settings[ProviderNamespaceKey] != null)
40-
{
41-
recoveryServicesResourceNamespace = appSettings.Settings[ProviderNamespaceKey].Value;
42-
}
4334
BmsAdapter = new ClientProxy<RecoveryServicesNS.RecoveryServicesBackupManagementClient, RecoveryServicesModelsNS.CustomRequestHeaders>(
4435
clientRequestId => new RecoveryServicesModelsNS.CustomRequestHeaders() { ClientRequestId = clientRequestId },
4536
creds, baseUri);
46-
BmsAdapter.Client.ResourceNamespace = recoveryServicesResourceNamespace;
37+
BmsAdapter.Client.ResourceNamespace = RecoveryServicesResourceNamespace;
4738
}
4839
}
4940
}

0 commit comments

Comments
 (0)