Esempio n. 1
0
 public bool LockList(LoginSession session, String server, Int32 list, String clientName)
 {
     _adcSrv.CheckListAvailability(server, list);
     if (IsListAvailable(session, server, list))
     {
         var proxy = _callbackCreator();
         if (!IsListLocked(new Channel(server, list)))
         {
             lock (_subscribers)
             {
                 if (!_subscribers.Exists(client => client.IsCurrentCallback(proxy)))
                 {
                     _subscribers.Add(new AsyncListServiceClient(proxy));
                 }
                 _subscribers.Find(client => client.IsCurrentCallback(proxy)).LockList(new Channel(server, list), clientName);
             }
             OnListLocked(new Channel(server, list), clientName);
         }
         return(true);
     }
     return(false);
 }