Exemplo n.º 1
0
 public Session(string username, string password)
 {
     try {
         REST = new REST.Session(username, password);
         WS   = new Sockets.Session(new Sockets.Configuration("spherechat.tk", 8080, "/ec", DateTime.Now.Ticks.ToString()), REST);
     }
     catch (System.Net.WebException e) {
         if (new Regex(@".*\(400\).*").IsMatch(e.Message))
         {
             throw new InvalidUserOrPasswordException();
         }
         else
         {
             throw new Exception("Erreur de connexion.", e);
         }
     }
 }
Exemplo n.º 2
0
 public Session(string username, string password)
 {
     REST = new REST.Session(username, password);
     WS   = new Sockets.Session(new Sockets.Configuration("spherechat.tk", 8080, "/ec", DateTime.Now.Ticks.ToString()), REST);
 }