Пример #1
0
 public Task<DTopic> GetAsync(Uri url) {
   var up = Uri.UnescapeDataString(url.UserInfo).Split(':');
   string uName = (up.Length > 0 && !string.IsNullOrWhiteSpace(up[0])) ? (up[0] + "@") : string.Empty;
   string host = url.Scheme + "://" + uName + url.DnsSafeHost + (url.IsDefaultPort ? string.Empty : (":" + url.Port.ToString())) + "/";
   A04Client cl;
   if(!_clients.TryGetValue(host, out cl)) {
     lock(_clients) {
       if(!_clients.TryGetValue(host, out cl)) {
         cl = new A04Client(host, up.Length == 2 ? up[1] : string.Empty);
         _clients[host] = cl;
       }
     }
   }
   return cl.root.GetAsync(url.LocalPath);
 }
Пример #2
0
 public WaitConnect(INotMsg req, A04Client client) {
   _req = req;
   _client = client;
 }