public AmazonWebServicesProvider(string credentialsProfileName)
        {
            if (string.IsNullOrWhiteSpace(credentialsProfileName))
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameCredentialsProfileName);
            }

            this.anchoringBehaviorValue = new AnchoringByIdentifierBehavior();
            AuthenticationOptions authenticationOptions = new NoAuthentication();
            this.Initialize(credentialsProfileName, this.anchoringBehaviorValue, authenticationOptions);
        }
        public AmazonWebServicesProvider(
            string credentialsProfileName, 
            WindowsAzureActiveDirectoryBearerAuthenticationOptions authenticationOptions)
        {
            if (string.IsNullOrWhiteSpace(credentialsProfileName))
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameCredentialsProfileName);
            }

            if (null == authenticationOptions)
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameAuthenticationOptions);
            }

            this.anchoringBehaviorValue = new AnchoringByIdentifierBehavior();
            this.Initialize(credentialsProfileName, this.anchoringBehaviorValue, authenticationOptions);
        }
        private void Initialize(
            string credentialsProfileName,
            IAmazonWebServicesIdentityAnchoringBehavior anchoringBehavior,
            AuthenticationOptions authenticationOptions)
        {
            if (string.IsNullOrWhiteSpace(credentialsProfileName))
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameCredentialsProfileName);
            }

            if (null == anchoringBehavior)
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameAnchoringBehavior);
            }

            if (null == authenticationOptions)
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameAuthenticationOptions);
            }

            this.credentials = new StoredProfileAWSCredentials(credentialsProfileName);

            this.anchoringBehaviorValue = anchoringBehavior;
            
            this.windowsAzureActiveDirectoryBearerAuthenticationOptions = 
                authenticationOptions as WindowsAzureActiveDirectoryBearerAuthenticationOptions;
            if (this.windowsAzureActiveDirectoryBearerAuthenticationOptions != null)
            {
                this.windowsAzureActiveDirectoryBearerAuthenticationOptions.TokenHandler = new TokenHandler();
            }
        }
        public AmazonWebServicesProvider(
            string credentialsProfileName,
            IAmazonWebServicesIdentityAnchoringBehavior anchoringBehavior)
        {
            if (string.IsNullOrWhiteSpace(credentialsProfileName))
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameCredentialsProfileName);
            }

            if (null == anchoringBehavior)
            {
                throw new ArgumentNullException(AmazonWebServicesProvider.ArgumentNameAnchoringBehavior);
            }

            AuthenticationOptions authenticationOptions = new NoAuthentication();
            this.Initialize(credentialsProfileName, anchoringBehavior, authenticationOptions);
        }