Skip to content

Commit

Permalink
rename extension method
Browse files Browse the repository at this point in the history
  • Loading branch information
lsfera committed Jul 15, 2024
1 parent c097047 commit ef9ac95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Blumchen.DependencyInjection/Workers/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ await pipeline.ExecuteAsync(async token =>
.ConnectionString(connectionString)
.WithTable(tableDescriptorBuilder)
.WithErrorProcessor(errorProcessor)
.Handles<T, IHandler<T>>(handler)
.Consumes<T, IHandler<T>>(handler)
.NamingPolicy(namingPolicy)
.JsonContext(jsonSerializerContext)
.WithPublicationOptions(publicationSetupOptions)
Expand Down
2 changes: 1 addition & 1 deletion src/Blumchen/Subscriptions/SubscriptionOptionsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public SubscriptionOptionsBuilder WithReplicationOptions(ReplicationSlotManageme
}

[UsedImplicitly]
public SubscriptionOptionsBuilder Handles<T, TU>(TU handler) where T : class
public SubscriptionOptionsBuilder Consumes<T, TU>(TU handler) where T : class
where TU : class, IHandler<T>
{
_registry.TryAdd(typeof(T), handler);
Expand Down
4 changes: 2 additions & 2 deletions src/Subscriber/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
)
.NamingPolicy(new AttributeNamingPolicy())
.JsonContext(SourceGenerationContext.Default)
.Handles<UserCreatedContract, Consumer>(consumer)
.Handles<UserDeletedContract, Consumer>(consumer), ct:ct
.Consumes<UserCreatedContract, Consumer>(consumer)
.Consumes<UserDeletedContract, Consumer>(consumer), ct:ct
).GetAsyncEnumerator(ct);
await using var cursor1 = cursor.ConfigureAwait(false);
while (await cursor.MoveNextAsync().ConfigureAwait(false) && !ct.IsCancellationRequested);
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/DatabaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected static async Task InsertPoisoningMessage(string connectionString, stri
.ConnectionString(connectionString)
.JsonContext(info)
.NamingPolicy(namingPolicy)
.Handles<T, TestHandler<T>>(consumer)
.Consumes<T, TestHandler<T>>(consumer)
.WithTable(o => o.Name(eventsTable))
.WithPublicationOptions(
new PublicationManagement.PublicationSetupOptions(PublicationName: publicationName ?? Randomise("events_pub"))
Expand Down

0 comments on commit ef9ac95

Please sign in to comment.