PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/mono-for-mac/3.3.0.1/PubNub-Messaging/PubNub-Console/Here_Now_Example.cs

https://github.com/jhey/pubnub-api
C# | 39 lines | 26 code | 8 blank | 5 comment | 0 complexity | d969890b68707a43fba6aed27a4e7f27 MD5 | raw file
Possible License(s): Apache-2.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace PubNub_Messaging
  6. {
  7. internal static class Here_Now_Example
  8. {
  9. /*public static void Main()
  10. {
  11. Here_Now_Demo();
  12. Console.ReadLine();
  13. }*/
  14. internal static void Here_Now_Demo()
  15. {
  16. Pubnub pubnub = new Pubnub(
  17. "demo",
  18. "demo",
  19. "",
  20. "",
  21. false);
  22. string channel = "my/channel";
  23. Console.WriteLine("Here_Now_Example");
  24. pubnub.here_now<string>(channel, DisplayReturnMessage);
  25. }
  26. static void DisplayReturnMessage(string result )
  27. {
  28. Console.WriteLine(result);
  29. }
  30. }
  31. }