예제 #1
0
        bool ICollection <Uri> .Remove(Uri item)
        {
            bool removed = _uriList.Remove(item);

            if (removed && (Speller != null))
            {
                Speller.OnDictionaryUriRemoved(item);
            }
            return(removed);
        }
예제 #2
0
        void IList <Uri> .RemoveAt(int index)
        {
            Uri uri = _uriList[index];

            _uriList.RemoveAt(index);

            if (Speller != null)
            {
                Speller.OnDictionaryUriRemoved(uri);
            }
        }
예제 #3
0
 /// <summary>
 /// Sets value at specified index.
 /// Speller is notified that value at the index is being replaced, which means
 /// current value at given offset is removed, and new value is added at the same index.
 /// </summary>
 /// <param name="index"></param>
 /// <returns></returns>
 Uri IList <Uri> .this[int index]
 {
     get
     {
         return(_uriList[index]);
     }
     set
     {
         ValidateUri(value);
         Uri oldUri = _uriList[index];
         if (Speller != null)
         {
             Speller.OnDictionaryUriRemoved(oldUri);
         }
         _uriList[index] = value;
         if (Speller != null)
         {
             Speller.OnDictionaryUriAdded(value);
         }
     }
 }