예제 #1
0
 /// <summary>
 /// Returns a synchronized (thread-safe) wrapper for
 /// the <see cref="TstDictionary"/>.
 /// </summary>
 /// <param name="table">The <see cref="TstDictionary"/> to synchronize.</param>
 /// <returns>A synchronized (thread-safe) wrapper for the
 /// <see cref="TstDictionary"/>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="table"/> is a null reference.</exception>
 public static TstDictionary Synchronized(TstDictionary table)
 {
     if (table == null)
     {
         throw new ArgumentNullException("table");
     }
     return(new TstSynchronizedDictionary(table));
 }
예제 #2
0
 /// <summary>
 /// Tarverses the ternary search tree nodes of <paramref name="dic"/>.
 /// </summary>
 /// <param name="dic">Tree to explore</param>
 /// <exception cref="ArgumentNullException"><paramref name="dic"/> is null.</exception>
 public void Traverse(TstDictionary dic)
 {
     if (dic == null)
     {
         throw new ArgumentNullException("dic");
     }
     Traverse(dic.Root);
 }
예제 #3
0
 /// <summary>Constructs an enumerator over <paramref name="tst"/></summary>
 /// <param name="tst">dictionary to enumerate.</param>
 /// <exception cref="ArgumentNullException">tst is null</exception>
 public TstDictionaryEnumerator(TstDictionary tst)
 {
     if (tst == null)
     {
         throw new ArgumentNullException("tst");
     }
     this.version     = tst.Version;
     this.dictionary  = tst;
     this.currentNode = null;
     this.stack       = null;
 }
예제 #4
0
 /// <summary>
 /// Creates a synchronized wrapper around the
 /// <see cref="TstDictionary"/> <paramref name="dic"/>.
 /// </summary>
 /// <param name="dic">Dictionary to synchronize</param>
 public TstSynchronizedDictionary(TstDictionary dic)
     : base()
 {
     this.wrapped = dic;
 }