Skip to content

Instantly share code, notes, and snippets.

@mookid8000
Last active December 20, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mookid8000/6119790 to your computer and use it in GitHub Desktop.
Save mookid8000/6119790 to your computer and use it in GitHub Desktop.
Configure.With(...)
.EnableWebCallbacks()
.(...)
// (...)
// just like that
adapter.Bus.Send(new SomeRequest {Message = "hello there!"},
(SomeReply reply) =>
{
Console.WriteLine("Got reply in callback: {0} - YAY!", reply.Message);
});
// with a timeout
adapter.Bus.Send(new SomeRequest {Message = "hello there!"},
(SomeReply reply) =>
{
Console.WriteLine("Got reply in callback: {0} - YAY!", reply.Message);
},
TimeSpan.FromSeconds(5),
() =>
{
Console.WriteLine("Oh noes!!!1");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment