Beispiel #1
0
 public void AddItem(IQueueItem item)
 {
     lock (this)
     {
         bool canBeAdded = item.UniqueKey == null || !UniqueIndex.Contains(item.UniqueKey);
         if (canBeAdded)
         {
             Queue.Add(item as InMemoryQueueItem);
             if (item.UniqueKey != null)
             {
                 UniqueIndex.Add(item.UniqueKey);
             }
         }
     }
 }
 public bool Contains(ConfigurationNode item) => _nameIndex.Contains(item);
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool Contains(ConfigurationNode item)
 {
     return(_nameIndex.Contains(item));
 }