public void Dispose() { foreach (var envVariable in originalEnvironmentVariables) { Environment.SetEnvironmentVariable(envVariable.Key, envVariable.Value); } Environment.SetEnvironmentVariable(AWS_PROFILE_ENVIRONMENT_VARIABLE, originalAWSProfileValue); AWSConfigs.AWSProfileName = originalAwsconfigAwsProfileName; AWSConfigs.AWSProfilesLocation = originalAwsconfigAwsProfilesLocation; ReflectionHelpers.Invoke(typeof(FallbackRegionFactory), "credentialProfileChain", originalRegionChain); ReflectionHelpers.Invoke(typeof(FallbackCredentialsFactory), "credentialProfileChain", originalCredsChain); ReflectionHelpers.Invoke(typeof(FallbackEndpointDiscoveryEnabledFactory), "credentialProfileChain", originalEndpointDiscoveryEnabledChain); ReflectionHelpers.Invoke(typeof(FallbackInternalConfigurationFactory), "_credentialProfileChain", originalConfigurationChain); netSdkFixture.Dispose(); sharedFixture.Dispose(); FallbackCredentialsFactory.Reset(); FallbackRegionFactory.Reset(); FallbackEndpointDiscoveryEnabledFactory.Reset(); FallbackInternalConfigurationFactory.Reset(); }
public void Dispose() { Environment.SetEnvironmentVariable(AWS_PROFILE_ENVIRONMENT_VARIABLE, originalAWSProfileValue); ReflectionHelpers.Invoke(typeof(FallbackRegionFactory), "credentialProfileChain", originalRegionChain); ReflectionHelpers.Invoke(typeof(FallbackCredentialsFactory), "credentialProfileChain", originalCredsChain); netSdkFixture.Dispose(); sharedFixture.Dispose(); FallbackCredentialsFactory.Reset(); FallbackRegionFactory.Reset(); }
public void Dispose() { foreach (var envVariable in originalEnvironmentVariables) { Environment.SetEnvironmentVariable(envVariable.Key, envVariable.Value); } Environment.SetEnvironmentVariable(AWS_PROFILE_ENVIRONMENT_VARIABLE, originalAWSProfileValue); Environment.SetEnvironmentVariable(AWS_ENABLE_ENDPOINT_DISCOVERY_ENVIRONMENT_VARIABLE, originalAWSEnableEndpointDiscoveryValue); ReflectionHelpers.Invoke(typeof(FallbackRegionFactory), "credentialProfileChain", originalRegionChain); ReflectionHelpers.Invoke(typeof(FallbackCredentialsFactory), "credentialProfileChain", originalCredsChain); ReflectionHelpers.Invoke(typeof(FallbackEndpointDiscoveryEnabledFactory), "credentialProfileChain", originalEndpointDiscoveryEnabledChain); netSdkFixture.Dispose(); sharedFixture.Dispose(); FallbackCredentialsFactory.Reset(); FallbackRegionFactory.Reset(); FallbackEndpointDiscoveryEnabledFactory.Reset(); }