public AmazonCredentials(string regionEndpoint) { if (string.IsNullOrEmpty(regionEndpoint)) throw new NullReferenceException("Amazon region endpoint не может быть пустым."); RegionEndpoint = global::Amazon.RegionEndpoint.GetBySystemName(regionEndpoint); bool isUnknownRegion = AmazonConstansts.UNKNOWN_CREDENTIALS_REGION.Equals(RegionEndpoint.DisplayName , StringComparison.InvariantCultureIgnoreCase); if (isUnknownRegion) { string comment = string.Format("Amazon region с именем {0} не обнаружен.", regionEndpoint); throw new KeyNotFoundException(comment); } }
public AmazonCredentials(string regionEndpoint) { if (string.IsNullOrEmpty(regionEndpoint)) { throw new NullReferenceException("Amazon region endpoint can not be empty."); } RegionEndpoint = global::Amazon.RegionEndpoint.GetBySystemName(regionEndpoint); bool isUnknownRegion = AmazonConstansts.UNKNOWN_CREDENTIALS_REGION.Equals( RegionEndpoint.DisplayName, StringComparison.InvariantCultureIgnoreCase); if (isUnknownRegion) { string comment = string.Format("Amazon region with name {0} not found.", regionEndpoint); throw new KeyNotFoundException(comment); } }