Exemple #1
0
 public bool AddList(ListParameter parameter)
 {
     lock (_targetLists)
     {
         var index = _targetLists.IndexOf(parameter);
         if (index >= 0) return false;
         _targetLists.Add(parameter);
         return true;
     }
 }
Exemple #2
0
 public bool RemoveList(ListParameter parameter)
 {
     lock (_targetLists)
     {
         var index = _targetLists.IndexOf(parameter);
         if (index < 0) return false;
         if (index < _accessIndex)
         {
             _accessIndex--;
         }
         _targetLists.RemoveAt(index);
         return true;
     }
 }