Example #1
0
        private static IAmazonSQS GetSqsClient(SqsServiceProviders sqsProviderType, IConfiguration configuration)
        {
            IAmazonSQS sqsClient = null;

            switch (sqsProviderType)
            {
            case SqsServiceProviders.Amazon:
                sqsClient = NativeAwsProvider.GetSqsClient();
                break;

            case SqsServiceProviders.GoAws:
                sqsClient = new GoAws(configuration).GetSqsClient();
                break;

            case SqsServiceProviders.LocalStack:
                sqsClient = new LocalStack(configuration).GetSqsClient();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(sqsProviderType));
            }

            return(sqsClient);
        }
Example #2
0
 public SqsClient(IConfiguration configuration, SqsServiceProviders providerType)
 {
     this._configuration = configuration;
     this._providerType  = providerType;
 }