Skip to content

Commit e1829f8

Browse files
committed
better patterns in the Service Collection Extensions (use the extension methods as intended)
1 parent 406f486 commit e1829f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/providers/WorkflowCore.Providers.AWS/ServiceCollectionExtensions.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static class ServiceCollectionExtensions
1717
public static WorkflowOptions UseAwsSimpleQueueService(this WorkflowOptions options, AWSCredentials credentials, AmazonSQSConfig config, string queuesPrefix = "workflowcore")
1818
{
1919
var sqsClient = new AmazonSQSClient(credentials, config);
20-
return UseAwsSimpleQueueServiceWithProvisionedClient(options, sqsClient, queuesPrefix);
20+
return options.UseAwsSimpleQueueServiceWithProvisionedClient(sqsClient, queuesPrefix);
2121
}
2222

2323
public static WorkflowOptions UseAwsSimpleQueueServiceWithProvisionedClient(this WorkflowOptions options, AmazonSQSClient sqsClient, string queuesPrefix = "workflowcore")
@@ -29,7 +29,7 @@ public static WorkflowOptions UseAwsSimpleQueueServiceWithProvisionedClient(this
2929
public static WorkflowOptions UseAwsDynamoLocking(this WorkflowOptions options, AWSCredentials credentials, AmazonDynamoDBConfig config, string tableName)
3030
{
3131
var dbClient = new AmazonDynamoDBClient(credentials, config);
32-
return UseAwsDynamoLockingWithProvisionedClient(options, dbClient, tableName);
32+
return options.UseAwsDynamoLockingWithProvisionedClient(dbClient, tableName);
3333
}
3434

3535
public static WorkflowOptions UseAwsDynamoLockingWithProvisionedClient (this WorkflowOptions options, AmazonDynamoDBClient dynamoClient, string tableName)
@@ -41,7 +41,7 @@ public static WorkflowOptions UseAwsDynamoLockingWithProvisionedClient (this Wor
4141
public static WorkflowOptions UseAwsDynamoPersistence(this WorkflowOptions options, AWSCredentials credentials, AmazonDynamoDBConfig config, string tablePrefix)
4242
{
4343
var dbClient = new AmazonDynamoDBClient(credentials, config);
44-
return UseAwsDynamoPersistenceWithProvisionedClient(options, dbClient, tablePrefix);
44+
return options.UseAwsDynamoPersistenceWithProvisionedClient(dbClient, tablePrefix);
4545
}
4646

4747
public static WorkflowOptions UseAwsDynamoPersistenceWithProvisionedClient(this WorkflowOptions options, AmazonDynamoDBClient dynamoClient, string tablePrefix)
@@ -56,7 +56,7 @@ public static WorkflowOptions UseAwsKinesis(this WorkflowOptions options, AWSCre
5656
var kinesisClient = new AmazonKinesisClient(credentials, region);
5757
var dynamoClient = new AmazonDynamoDBClient(credentials, region);
5858

59-
return UseAwsKinesisWithProvisionedClients(options, kinesisClient, dynamoClient,appName, streamName);
59+
return options.UseAwsKinesisWithProvisionedClients(kinesisClient, dynamoClient,appName, streamName);
6060

6161
}
6262

0 commit comments

Comments
 (0)