Beispiel #1
0
        protected SortedDictionary(SerializationInfo info, StreamingContext context)
        {
            hlp  = (NodeHelper)info.GetValue("Helper", typeof(NodeHelper));
            tree = new RBTree(hlp);

            KeyValuePair <TKey, TValue>[] data = (KeyValuePair <TKey, TValue>[])info.GetValue("KeyValuePairs", typeof(KeyValuePair <TKey, TValue>[]));
            foreach (KeyValuePair <TKey, TValue> entry in data)
            {
                Add(entry.Key, entry.Value);
            }
        }
Beispiel #2
0
 public void Dispose()
 {
     tree     = null;
     pennants = null;
 }
Beispiel #3
0
 internal NodeEnumerator(RBTree tree, Stack <Node> init_pennants)
     : this(tree)
 {
     this.init_pennants = init_pennants;
 }
Beispiel #4
0
 internal NodeEnumerator(RBTree tree)
     : this()
 {
     this.tree = tree;
     version   = tree.version;
 }
Beispiel #5
0
 public SortedDictionary(IComparer <TKey> comparer)
 {
     hlp  = NodeHelper.GetHelper(comparer);
     tree = new RBTree(hlp);
 }