diff --git a/src/providers/WorkflowCore.Providers.AWS/ServiceCollectionExtensions.cs b/src/providers/WorkflowCore.Providers.AWS/ServiceCollectionExtensions.cs index 5d62bf3dc..c3c545f80 100644 --- a/src/providers/WorkflowCore.Providers.AWS/ServiceCollectionExtensions.cs +++ b/src/providers/WorkflowCore.Providers.AWS/ServiceCollectionExtensions.cs @@ -17,7 +17,7 @@ public static class ServiceCollectionExtensions public static WorkflowOptions UseAwsSimpleQueueService(this WorkflowOptions options, AWSCredentials credentials, AmazonSQSConfig config, string queuesPrefix = "workflowcore") { var sqsClient = new AmazonSQSClient(credentials, config); - return UseAwsSimpleQueueServiceWithProvisionedClient(options, sqsClient, queuesPrefix); + return options.UseAwsSimpleQueueServiceWithProvisionedClient(sqsClient, queuesPrefix); } public static WorkflowOptions UseAwsSimpleQueueServiceWithProvisionedClient(this WorkflowOptions options, AmazonSQSClient sqsClient, string queuesPrefix = "workflowcore") @@ -29,7 +29,7 @@ public static WorkflowOptions UseAwsSimpleQueueServiceWithProvisionedClient(this public static WorkflowOptions UseAwsDynamoLocking(this WorkflowOptions options, AWSCredentials credentials, AmazonDynamoDBConfig config, string tableName) { var dbClient = new AmazonDynamoDBClient(credentials, config); - return UseAwsDynamoLockingWithProvisionedClient(options, dbClient, tableName); + return options.UseAwsDynamoLockingWithProvisionedClient(dbClient, tableName); } public static WorkflowOptions UseAwsDynamoLockingWithProvisionedClient (this WorkflowOptions options, AmazonDynamoDBClient dynamoClient, string tableName) @@ -41,7 +41,7 @@ public static WorkflowOptions UseAwsDynamoLockingWithProvisionedClient (this Wor public static WorkflowOptions UseAwsDynamoPersistence(this WorkflowOptions options, AWSCredentials credentials, AmazonDynamoDBConfig config, string tablePrefix) { var dbClient = new AmazonDynamoDBClient(credentials, config); - return UseAwsDynamoPersistenceWithProvisionedClient(options, dbClient, tablePrefix); + return options.UseAwsDynamoPersistenceWithProvisionedClient(dbClient, tablePrefix); } public static WorkflowOptions UseAwsDynamoPersistenceWithProvisionedClient(this WorkflowOptions options, AmazonDynamoDBClient dynamoClient, string tablePrefix) @@ -56,7 +56,7 @@ public static WorkflowOptions UseAwsKinesis(this WorkflowOptions options, AWSCre var kinesisClient = new AmazonKinesisClient(credentials, region); var dynamoClient = new AmazonDynamoDBClient(credentials, region); - return UseAwsKinesisWithProvisionedClients(options, kinesisClient, dynamoClient,appName, streamName); + return options.UseAwsKinesisWithProvisionedClients(kinesisClient, dynamoClient,appName, streamName); }