Skip to content

Commit b3433d1

Browse files
authored
refactor(#25): changed the method definition for Execute/StartMigration(Async) (#29)
1 parent 4da0ee9 commit b3433d1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Migrator/PublicAPI/net8.0/PublicAPI.Unshipped.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ static InfinityFlow.Temporal.Migrator.TemporalMigratorBuilderExtensions.Configur
2121
static InfinityFlow.Temporal.Migrator.TemporalMigratorBuilderExtensions.ConfigureMigratorOptions(this InfinityFlow.Temporal.Migrator.Builder.ITemporalMigratorBuilder! temporalMigratorBuilder, System.Action<Microsoft.Extensions.Options.OptionsBuilder<InfinityFlow.Temporal.Migrator.MigratorOptions!>!>! configureOptions) -> InfinityFlow.Temporal.Migrator.Builder.ITemporalMigratorBuilder!
2222
static InfinityFlow.Temporal.Migrator.TemporalMigratorBuilderExtensions.ConfigureWorkerOptions(this InfinityFlow.Temporal.Migrator.Builder.ITemporalMigratorBuilder! temporalMigratorBuilder, System.Action<Temporalio.Extensions.Hosting.ITemporalWorkerServiceOptionsBuilder!>! configureOptions) -> InfinityFlow.Temporal.Migrator.Builder.ITemporalMigratorBuilder!
2323
static Microsoft.Extensions.Hosting.ServiceCollectionExtensions.AddTemporalMigrations(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, string! taskQueue = "migration", string! clientTargetHost = "localhost:7233", string! clientNamespace = "default", string? buildId = null) -> InfinityFlow.Temporal.Migrator.Builder.ITemporalMigratorBuilder!
24-
static Temporalio.Client.TemporalClientExtensions.ExecuteMigration(this Temporalio.Client.ITemporalClient! temporalClient, Temporalio.Client.WorkflowOptions! workflowOptions) -> System.Threading.Tasks.Task!
25-
static Temporalio.Client.TemporalClientExtensions.StartMigration(this Temporalio.Client.ITemporalClient! temporalClient, Temporalio.Client.WorkflowOptions! workflowOptions) -> System.Threading.Tasks.Task<Temporalio.Client.WorkflowHandle!>!
24+
static Temporalio.Client.TemporalClientExtensions.ExecuteMigrationAsync(this Temporalio.Client.ITemporalClient! temporalClient, Temporalio.Client.WorkflowOptions! workflowOptions) -> System.Threading.Tasks.Task!
25+
static Temporalio.Client.TemporalClientExtensions.StartMigrationAsync(this Temporalio.Client.ITemporalClient! temporalClient, Temporalio.Client.WorkflowOptions! workflowOptions) -> System.Threading.Tasks.Task<Temporalio.Client.WorkflowHandle!>!
2626
Temporalio.Client.TemporalClientExtensions

src/Migrator/TemporalClientExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static class TemporalClientExtensions
1616
/// <param name="temporalClient">The temporal client.</param>
1717
/// <param name="workflowOptions">The workflow options.</param>
1818
/// <returns>The <see cref="Task"/>.</returns>
19-
public static Task ExecuteMigration(this ITemporalClient temporalClient, WorkflowOptions workflowOptions)
19+
public static Task ExecuteMigrationAsync(this ITemporalClient temporalClient, WorkflowOptions workflowOptions)
2020
{
2121
ArgumentNullException.ThrowIfNull(temporalClient);
2222
ArgumentNullException.ThrowIfNull(workflowOptions);
@@ -31,7 +31,7 @@ public static Task ExecuteMigration(this ITemporalClient temporalClient, Workflo
3131
/// <param name="temporalClient">The temporal client.</param>
3232
/// <param name="workflowOptions">The workflow options.</param>
3333
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns>
34-
public static async Task<WorkflowHandle> StartMigration(this ITemporalClient temporalClient, WorkflowOptions workflowOptions)
34+
public static async Task<WorkflowHandle> StartMigrationAsync(this ITemporalClient temporalClient, WorkflowOptions workflowOptions)
3535
{
3636
ArgumentNullException.ThrowIfNull(temporalClient);
3737
ArgumentNullException.ThrowIfNull(workflowOptions);

test/Migrator/TemporalTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task TemporalWorkflowFromStartToFinish()
4242
await _temporalWorker.ExecuteAsync(async () =>
4343
{
4444
await _temporalClient
45-
.ExecuteMigration(
45+
.ExecuteMigrationAsync(
4646
new WorkflowOptions
4747
{
4848
Id = Guid.NewGuid().ToString(),

0 commit comments

Comments
 (0)