From 07540cfb5f7f872e4189802eddd813a964e81eb9 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Mon, 2 Aug 2021 22:39:33 -0600 Subject: [PATCH] Doc updates for collections --- .../ConcurrentDictionary`2.xml | 17 +- xml/System.Collections.Generic/List`1.xml | 5 +- ...`2+UnorderedItemsCollection+Enumerator.xml | 41 ++-- ...iorityQueue`2+UnorderedItemsCollection.xml | 63 +++++-- .../PriorityQueue`2.xml | 178 ++++++++++++------ xml/System.Collections.Generic/Queue`1.xml | 4 +- .../SortedList`2.xml | 2 +- xml/System.Collections.Generic/Stack`1.xml | 5 +- 8 files changed, 220 insertions(+), 95 deletions(-) diff --git a/xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml b/xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml index 86ef27985c5..2ff9cd11cdc 100644 --- a/xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml +++ b/xml/System.Collections.Concurrent/ConcurrentDictionary`2.xml @@ -719,9 +719,20 @@ System.Collections.Generic.IEqualityComparer<TKey> - To be added. - To be added. - To be added. + Gets the that is used to determine equality of keys for the dictionary. + The generic interface implementation that is used to determine equality of keys for the current and to provide hash values for the keys. + + requires an equality implementation to determine + whether keys are equal. You can specify an implementation of the + generic interface by using a constructor that accepts a comparer parameter; + if you do not specify one, the default generic equality comparer is used. + + ]]> + diff --git a/xml/System.Collections.Generic/List`1.xml b/xml/System.Collections.Generic/List`1.xml index fde59e3846b..a7935ca80cc 100644 --- a/xml/System.Collections.Generic/List`1.xml +++ b/xml/System.Collections.Generic/List`1.xml @@ -1418,8 +1418,9 @@ - To be added. - To be added. + The minimum capacity to ensure. + Ensures that the capacity of this list is at least the specified . + If the current capacity of the list is less than specified , the capacity is increased by continuously twice current capacity until it is at least the specified . To be added. To be added. diff --git a/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection+Enumerator.xml b/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection+Enumerator.xml index 60dd900c3f4..4e36adc687c 100644 --- a/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection+Enumerator.xml +++ b/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection+Enumerator.xml @@ -28,7 +28,7 @@ - To be added. + Enumerates the element and priority pairs of a , without any ordering guarantees. To be added. @@ -57,7 +57,7 @@ System.ValueTuple<TElement,TPriority> - To be added. + Gets the element at the current position of the enumerator. To be added. To be added. @@ -82,7 +82,7 @@ - To be added. + Releases all resources used by the . To be added. @@ -106,8 +106,9 @@ - To be added. - To be added. + Advances the enumerator to the next element of the . + + if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the collection. To be added. @@ -136,8 +137,8 @@ System.ValueTuple<TElement,TPriority> - To be added. - To be added. + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. To be added. @@ -160,9 +161,17 @@ System.Object - To be added. - To be added. - To be added. + Gets the element in the collection at the current position of the enumerator. + The element in the collection at the current position of the enumerator. + + instance is cast to an interface. + + ]]> + @@ -185,8 +194,16 @@ - To be added. - To be added. + Sets the enumerator to its initial position, which is before the first element in the collection. + + instance is cast to an interface. + + ]]> + diff --git a/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection.xml b/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection.xml index 1bc509bf70f..8f82a20a576 100644 --- a/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection.xml +++ b/xml/System.Collections.Generic/PriorityQueue`2+UnorderedItemsCollection.xml @@ -34,7 +34,7 @@ - To be added. + Enumerates the contents of a , without any ordering guarantees. To be added. @@ -58,8 +58,8 @@ System.Int32 - To be added. - To be added. + Gets the number of elements in the collection. + The number of elements in the collection. To be added. @@ -80,8 +80,8 @@ - To be added. - To be added. + Returns an enumerator that iterates through the . + An for the . To be added. @@ -111,8 +111,8 @@ - To be added. - To be added. + Returns an enumerator that iterates through the collection. + An enumerator that can be used to iterate through the collection. To be added. @@ -139,9 +139,9 @@ - To be added. - To be added. - To be added. + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + Copies the elements of the to an , starting at a particular index. To be added. @@ -164,9 +164,18 @@ System.Boolean - To be added. - To be added. - To be added. + Gets a value indicating whether access to the is synchronized (thread safe). + + if access to the is synchronized (thread safe); otherwise, . + + instance is cast to an interface. + + ]]> + @@ -188,9 +197,17 @@ System.Object - To be added. - To be added. - To be added. + Gets an object that can be used to synchronize access to the . + An object that can be used to synchronize access to the . + + instance is cast to an interface. + + ]]> + @@ -213,9 +230,17 @@ - To be added. - To be added. - To be added. + Returns an enumerator that iterates through a collection. + An object that can be used to iterate through the collection. + + instance is cast to an interface. + + ]]> + diff --git a/xml/System.Collections.Generic/PriorityQueue`2.xml b/xml/System.Collections.Generic/PriorityQueue`2.xml index b714d35653e..fc39f31e9a7 100644 --- a/xml/System.Collections.Generic/PriorityQueue`2.xml +++ b/xml/System.Collections.Generic/PriorityQueue`2.xml @@ -18,10 +18,19 @@ - To be added. - To be added. - To be added. - To be added. + Specifies the type of elements in the queue. + Specifies the type of priority associated with enqueued elements. + Represents a min priority queue. + + + @@ -37,7 +46,7 @@ - To be added. + Initializes a new instance of the class. To be added. @@ -57,8 +66,9 @@ - To be added. - To be added. + Custom comparer dictating the ordering of elements. + Uses if the argument is . + Initializes a new instance of the class with the specified custom priority comparer. To be added. @@ -85,9 +95,19 @@ - To be added. - To be added. - To be added. + The pairs of elements and priorities with which to populate the queue. + Initializes a new instance of the class that is populated with the specified elements and priorities. + + + + The specified argument was . @@ -106,9 +126,10 @@ - To be added. - To be added. + Initial capacity to allocate in the underlying heap array. + Initializes a new instance of the class with the specified initial capacity. To be added. + The specified was negative. @@ -135,10 +156,21 @@ - To be added. - To be added. - To be added. - To be added. + The pairs of elements and priorities with which to populate the queue. + Custom comparer dictating the ordering of elements. + Uses if the argument is . + Initializes a new instance of the class that is populated with the specified elements and priorities, and with the specified custom priority comparer. + + + + The specified argument was . @@ -158,10 +190,12 @@ - To be added. - To be added. - To be added. + Initial capacity to allocate in the underlying heap array. + Custom comparer dictating the ordering of elements. + Uses if the argument is . + Initializes a new instance of the class with the specified initial capacity and custom priority comparer. To be added. + The specified was negative. @@ -181,7 +215,7 @@ - To be added. + Removes all items from the . To be added. @@ -201,7 +235,7 @@ System.Collections.Generic.IComparer<TPriority> - To be added. + Gets the priority comparer used by the . To be added. To be added. @@ -222,7 +256,7 @@ System.Int32 - To be added. + Gets the number of elements contained in the . To be added. To be added. @@ -244,9 +278,10 @@ - To be added. - To be added. + Removes and returns the minimal element from the . + The minimal element of the . To be added. + The queue is empty. @@ -269,9 +304,9 @@ - To be added. - To be added. - To be added. + The element to add to the . + The priority with which to associate the new element. + Adds the specified element with associated priority to the . To be added. @@ -295,11 +330,21 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The element to add to the . + The priority with which to associate the new element. + Adds the specified element with associated priority to the , and immediately removes the minimal element, returning the result. + The minimal element removed after the enqueue operation. + + + @@ -328,9 +373,10 @@ - To be added. - To be added. + The pairs of elements and priorities to add to the queue. + Enqueues a sequence of element/priority pairs to the . To be added. + The specified argument was . @@ -353,10 +399,11 @@ - To be added. - To be added. - To be added. + The elements to add to the queue. + The priority to associate with the new elements. + Enqueues a sequence of elements pairs to the , all associated with the specified priority. To be added. + The specified argument was . @@ -378,10 +425,11 @@ - To be added. - To be added. - To be added. + The minimum capacity to be used. + Ensures that the can hold up to items without further expansion of its backing storage. + The current capacity of the . To be added. + The specified is negative. @@ -401,9 +449,10 @@ - To be added. - To be added. + Returns the minimal element from the without removing it. + The minimal element of the . To be added. + The is empty. @@ -423,8 +472,17 @@ - To be added. - To be added. + Sets the capacity to the actual number of items in the , if that is less than 90 percent of current capacity. + + + @@ -461,10 +519,11 @@ - To be added. - To be added. - To be added. - To be added. + The removed element. + The priority associated with the removed element. + Removes the minimal element from the , and copies it to the parameter, and its associated priority to the parameter. + + if the element is successfully removed; if the is empty. To be added. @@ -502,10 +561,12 @@ - To be added. - To be added. - To be added. - To be added. + The minimal element in the queue. + The priority associated with the minimal element. + Returns a value that indicates whether there is a minimal element in the , and if one is present, copies it to the parameter, and its associated priority to the parameter. + The element is not removed from the . + + if there is a minimal element; if the is empty. To be added. @@ -525,9 +586,18 @@ System.Collections.Generic.PriorityQueue<TElement,TPriority>+UnorderedItemsCollection - To be added. + Gets a collection that enumerates the elements of the queue in an unordered manner. To be added. - To be added. + + + diff --git a/xml/System.Collections.Generic/Queue`1.xml b/xml/System.Collections.Generic/Queue`1.xml index 57bab1ae27a..9b7c3455f43 100644 --- a/xml/System.Collections.Generic/Queue`1.xml +++ b/xml/System.Collections.Generic/Queue`1.xml @@ -733,8 +733,8 @@ - To be added. - To be added. + The minimum capacity to ensure. + Ensures that the capacity of this Queue is at least the specified . To be added. To be added. diff --git a/xml/System.Collections.Generic/SortedList`2.xml b/xml/System.Collections.Generic/SortedList`2.xml index 84a3e7617cf..2b2d3015f41 100644 --- a/xml/System.Collections.Generic/SortedList`2.xml +++ b/xml/System.Collections.Generic/SortedList`2.xml @@ -1942,7 +1942,7 @@ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. - To be added. + The zero-based index in at which copying begins. Copies the elements of the to an , starting at a particular index. - To be added. - To be added. + The minimum capacity to ensure. + Ensures that the capacity of this Stack is at least the specified . + If the current capacity of the Stack is less than specified , the capacity is increased by continuously twice current capacity until it is at least the specified . To be added. To be added.