Exemplo n.º 1
0
 /// <summary>
 /// Constructor. Initializes hubconnection
 /// </summary>
 public GeoHub()
 {
     connection = new HubConnection(connectionUrl);
     hubProxy = connection.CreateHubProxy(hubName);
     connection.Start().Wait();
     //hubProxy.Invoke("Send", "Info", "").Wait();
     _hub = this;
 }
Exemplo n.º 2
0
 public static GeoHub GetGeoHub()
 {
     if(_hub == null)
         _hub = new GeoHub();
     return _hub;
 }
Exemplo n.º 3
0
 public void TestGeoHub()
 {
     var hub = new GeoHub();
     hub.SendMessage(new GeoIp()
     {
         description = "Test geo ip location",
         GeoIpId = 1337,
         Ip = "1.3.3.7",
         Lat = 53,
         Long = 4
     });
     Thread.Sleep(1);
 }