Skip to content

Commit 5948943

Browse files
Fix examples in README (#25)
1 parent 9cb6596 commit 5948943

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public record struct MyMessage (string Id, string Operation, int Value);
3434
// create a worker type with the minimum implementation
3535
class MyWorker : IWorker<MyMessage> {
3636
// Workers will be scheduled by the default TaskScheduler from dotnet
37-
public Task ConsumeAsync (WorkQueuesEvent message, CancellationToken cancellationToken = default)
37+
public Task ConsumeAsync (MyMessage message, CancellationToken cancellationToken = default)
3838
=> Task.FromResult (Completion.TrySetResult(true));
3939
}
4040

@@ -80,8 +80,8 @@ are processed. That can be done by waiting on a Channel to be closed:
8080

8181
```csharp
8282
// close a specific topic
83-
await _hub.CloseAsync<WorkQueuesEvent> (topic);
83+
await _hub.CloseAsync<MyMessage> (topic);
8484

8585
// close all topcis
86-
await _hub.CloseAsync<WorkQueuesEvent> (topic1);
86+
await _hub.CloseAsync<MyMessage> (topic1);
8787
```

0 commit comments

Comments
 (0)