Commit 5914a91f authored by francoance's avatar francoance Committed by Marc Gravell

Updated Basics.md - Missing parentheses (#1245)

parent 7f56a803
......@@ -90,13 +90,13 @@ In v2, you can subscribe without providing a callback directly to the `Subscribe
// Synchronous handler
sub.Subscribe("messages").OnMessage(channelMessage => {
Console.WriteLine((string) channelMessage.Message);
};
});
// Asynchronous handler
sub.Subscribe("messages").OnMessage(async channelMessage => {
await Task.Delay(1000);
Console.WriteLine((string) channelMessage.Message);
};
});
```
Separately (and often in a separate process on a separate machine) you can publish to this channel:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment