Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
5914a91f
Commit
5914a91f
authored
Oct 03, 2019
by
francoance
Committed by
Marc Gravell
Oct 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Basics.md - Missing parentheses (#1245)
parent
7f56a803
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Basics.md
docs/Basics.md
+2
-2
No files found.
docs/Basics.md
View file @
5914a91f
...
@@ -90,13 +90,13 @@ In v2, you can subscribe without providing a callback directly to the `Subscribe
...
@@ -90,13 +90,13 @@ In v2, you can subscribe without providing a callback directly to the `Subscribe
// Synchronous handler
// Synchronous handler
sub
.
Subscribe
(
"messages"
).
OnMessage
(
channelMessage
=>
{
sub
.
Subscribe
(
"messages"
).
OnMessage
(
channelMessage
=>
{
Console
.
WriteLine
((
string
)
channelMessage
.
Message
);
Console
.
WriteLine
((
string
)
channelMessage
.
Message
);
};
}
)
;
// Asynchronous handler
// Asynchronous handler
sub
.
Subscribe
(
"messages"
).
OnMessage
(
async
channelMessage
=>
{
sub
.
Subscribe
(
"messages"
).
OnMessage
(
async
channelMessage
=>
{
await
Task
.
Delay
(
1000
);
await
Task
.
Delay
(
1000
);
Console
.
WriteLine
((
string
)
channelMessage
.
Message
);
Console
.
WriteLine
((
string
)
channelMessage
.
Message
);
};
}
)
;
```
```
Separately (and often in a separate process on a separate machine) you can publish to this channel:
Separately (and often in a separate process on a separate machine) you can publish to this channel:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment