예제 #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);
            }
        }
예제 #2
0
 public void Dispose()
 {
     tree     = null;
     pennants = null;
 }
예제 #3
0
 internal NodeEnumerator(RBTree tree, Stack <Node> init_pennants)
     : this(tree)
 {
     this.init_pennants = init_pennants;
 }
예제 #4
0
 internal NodeEnumerator(RBTree tree)
     : this()
 {
     this.tree = tree;
     version   = tree.version;
 }
예제 #5
0
 public SortedDictionary(IComparer <TKey> comparer)
 {
     hlp  = NodeHelper.GetHelper(comparer);
     tree = new RBTree(hlp);
 }