// Removes the specified item from the tree, and returns a new tree. // If any item in 'names' cannot be found, sets fAnyMissing to true. public ValueTree RemoveItems(ref bool fAnyMissing, params DName[] names) { Contracts.AssertNonEmpty(names); Contracts.AssertAllValid(names); RedBlackNode <EquatableObject> root = _root; foreach (string name in names) { Contracts.AssertNonEmpty(name); root = RedBlackNode <EquatableObject> .RemoveItem(ref fAnyMissing, root, name, _hashCodeCache); } return(new ValueTree(root)); }
// Removes the specified item from the tree, and returns a new tree. // If any item in rgname cannot be found, sets fAnyMissing to true. public TypeTree RemoveItems(ref bool fAnyMissing, params DName[] rgname) { Contracts.AssertNonEmpty(rgname); Contracts.AssertAllValid(rgname); RedBlackNode <DType> root = _root; foreach (string name in rgname) { Contracts.AssertNonEmpty(name); root = RedBlackNode <DType> .RemoveItem(ref fAnyMissing, root, name, _hashCodeCache); } return(new TypeTree(root)); }
// Removes the specified name+value from the tree, and returns a new tree. // Sets fMissing if name cannot be found. public ValueTree RemoveItem(ref bool fMissing, string name) { Contracts.AssertValue(name); return(new ValueTree(RedBlackNode <EquatableObject> .RemoveItem(ref fMissing, _root, name, _hashCodeCache))); }
// Removes the specified name/field from the tree, and returns a new tree. // Sets fMissing if name cannot be found. public TypeTree RemoveItem(ref bool fMissing, string name) { Contracts.AssertValue(name); return(new TypeTree(RedBlackNode <DType> .RemoveItem(ref fMissing, _root, name, _hashCodeCache))); }