public void OnNext(TSource value)
 {
     try
     {
         _dictionary.Add(_parent._keySelector(value), _parent._elementSelector(value));
     }
     catch (Exception ex)
     {
         base._observer.OnError(ex);
         base.Dispose();
     }
 }
 public void OnNext(TSource value)
 {
     try
     {
         // call Dictionary.Add(key,value) function to add a new element to _dictionary.
         // _keySelector is a function that convert a TSource data to a TKey type.
         // _elementSelector is also a function which convert a TSource data to a TKey type.
         // Watch  out! Add  doesn't let to add a value a key already eixsts.
         // System.ArgumentException:
         //           An element with the same key already exists in the System.Collections.Generic.Dictionary<TKey,TValue>.
         _dictionary.Add(_parent._keySelector(value), _parent._elementSelector(value));
     }
     catch (Exception ex)
     {
         base._observer.OnError(ex);
         base.Dispose();
     }
 }