public SQSQueue(SQSQueueOptions <T> options) : base(options) { // TODO: Flow through the options like retries and the like. _client = new Lazy <AmazonSQSClient>(() => { var credentials = options.Credentials ?? FallbackCredentialsFactory.GetCredentials(); var region = options.Region ?? FallbackRegionFactory.GetRegionEndpoint() ?? RegionEndpoint.USEast1; return(new AmazonSQSClient(credentials, region)); }); }
public SQSQueue(SQSQueueOptions <T> options) : base(options) { // TODO: Flow through the options like retries and the like. _client = new Lazy <AmazonSQSClient>(() => { var credentials = options.Credentials ?? FallbackCredentialsFactory.GetCredentials(); if (String.IsNullOrEmpty(options.ServiceUrl)) { var region = options.Region ?? FallbackRegionFactory.GetRegionEndpoint(); return(new AmazonSQSClient(credentials, region)); } return(new AmazonSQSClient( credentials, new AmazonSQSConfig { RegionEndpoint = RegionEndpoint.USEast1, ServiceURL = options.ServiceUrl })); }); }
public SQSQueue(SQSQueueOptions <T> options) : base(options) { _client = new Lazy <AmazonSQSClient>(() => new AmazonSQSClient(options.Credentials ?? FallbackCredentialsFactory.GetCredentials(), options.RegionEndpoint)); }