Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paramrefs (System.Collections, System.Buffers, etc.) #10791

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
<returns>A service object of type <paramref name="serviceType" />.
Throws an exception if the <see cref="T:System.IServiceProvider" /> cannot create the object.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ObjectDisposedException">
<paramref name="provider" /> has already been disposed.</exception>
</Docs>
</Member>
</Members>
Expand Down
8 changes: 4 additions & 4 deletions xml/System.Buffers.Text/Base64Url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
<Docs>
<param name="source">The input span which contains binary data that needs to be encoded.</param>
<param name="destination">The output span which contains the result of the operation, i.e. the ASCII chars in Base64Url.</param>
<summary>Encodes the span of binary data into unicode ASCII chars represented as Base64Url.</summary>
<summary>Encodes the span of binary data into Unicode ASCII chars represented as Base64Url.</summary>
<returns>The number of bytes written into the destination span. This can be used to slice the output for subsequent calls, if necessary.</returns>
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
<exception cref="T:System.ArgumentException">The buffer in <paramref name="destination" /> is too small to hold the encoded output.</exception>
Expand Down Expand Up @@ -791,7 +791,7 @@
<param name="source">The input span which contains ASCII chars in Base64Url that needs to be decoded.</param>
<param name="destination">The output span which contains the result of the operation, i.e. the decoded binary data.</param>
<param name="bytesWritten">When this method returns, contains the number of bytes written into the output span. This can be used to slice the output for subsequent calls, if necessary. This parameter is treated as uninitialized.</param>
<summary>Decodes the span of unicode ASCII chars represented as Base64Url into binary data.</summary>
<summary>Decodes the span of Unicode ASCII chars represented as Base64Url into binary data.</summary>
<returns>
<see langword="true" /> if bytes decoded successfully; <see langword="false" /> if <paramref name="destination" /> is too small.</returns>
<remarks>To be added.</remarks>
Expand Down Expand Up @@ -869,7 +869,7 @@
<param name="source">The input span which contains binary data that needs to be encoded.</param>
<param name="destination">The output span which contains the result of the operation, i.e. the ASCII chars in Base64Url.</param>
<param name="charsWritten">When this method returns, contains the number of chars written into the output span. This can be used to slice the output for subsequent calls, if necessary. This parameter is treated as uninitialized.</param>
<summary>Encodes the span of binary data into unicode ASCII chars represented as Base64Url.</summary>
<summary>Encodes the span of binary data into Unicode ASCII chars represented as Base64Url.</summary>
<returns>
<see langword="true" /> if chars encoded successfully; <see langword="false" /> if <paramref name="destination" /> is too small.</returns>
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
Expand Down Expand Up @@ -948,7 +948,7 @@
<para>The encoded text output is larger than the binary data contained in the input (the operation inflates the data).</para>
</summary>
<returns>
<see langword="true" /> if bytes encoded successfully; <see langword="false" /> if <paramref name="destination" /> is too small.</returns>
<see langword="true" /> if bytes encoded successfully; <see langword="false" /> if <paramref name="buffer" /> is too small to fit the result.</returns>
<remarks>This implementation of the base64url encoding omits the optional padding characters.</remarks>
</Docs>
</Member>
Expand Down
4 changes: 2 additions & 2 deletions xml/System.Buffers/BuffersExtensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@
<typeparam name="T">The type of the items in the <see cref="T:System.Buffers.ReadOnlySequence`1" />.</typeparam>
<param name="source">The source <see cref="T:System.Buffers.ReadOnlySequence`1" />.</param>
<param name="value">The item to find in the <see cref="T:System.Buffers.ReadOnlySequence`1" />.</param>
<summary>Returns the position of the first occurrence of <paramref name="item" /> in the <see cref="T:System.Buffers.ReadOnlySequence`1" />.</summary>
<returns>An object whose <see cref="M:System.SequencePosition.GetInteger" /> method returns the position of the first occurrence of <paramref name="item" />, or an object whose <see langword="Nullable&lt;SequencePosition&gt;.HasValue" /> property is <see langword="false" /> .</returns>
<summary>Returns the position of the first occurrence of <paramref name="value" /> in the <see cref="T:System.Buffers.ReadOnlySequence`1" />.</summary>
<returns>An object whose <see cref="M:System.SequencePosition.GetInteger" /> method returns the position of the first occurrence of <paramref name="value" />, or an object whose <see langword="Nullable&lt;SequencePosition&gt;.HasValue" /> property is <see langword="false" /> .</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ This member is an explicit interface member implementation. It can be used only

]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">At least one of the <see cref="T:System.Collections.Concurrent.BlockingCollection`1" /> instances or the <see cref="T:System.Threading.CancellationTokenSource" /> that created <paramref name="cancellationToken" /> has been disposed.</exception>
<exception cref="T:System.ObjectDisposedException">At least one of the <see cref="T:System.Collections.Concurrent.BlockingCollection`1" /> instances has been disposed.</exception>
<exception cref="T:System.ArgumentNullException">The <paramref name="collections" /> argument is null.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="timeout" /> is a negative number other than -1 milliseconds, which represents an infinite time-out.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ The number of elements in the source <see cref="T:System.Collections.ICollection
<param name="keyValuePair">The <see cref="T:System.Collections.Generic.KeyValuePair`2" /> to remove.</param>
<summary>Removes the specified key/value pair from the collection.</summary>
<returns>
<see langword="true" /> if the element is successfully removed; otherwise, <see langword="false" />. This method also returns false if <paramref name="key" /> was not found in the original <see cref="T:System.Collections.Generic.ICollection`1" />.</returns>
<see langword="true" /> if the element is successfully removed; otherwise, <see langword="false" />. This method also returns false if the key was not found in the original <see cref="T:System.Collections.Generic.ICollection`1" />.</returns>
<remarks>To be added.</remarks>
<related type="Article" href="/dotnet/standard/collections/thread-safe/">Thread-Safe Collections</related>
<related type="Article" href="/dotnet/standard/collections/thread-safe/how-to-add-and-remove-items">How to: Add and Remove Items from a ConcurrentDictionary</related>
Expand Down
14 changes: 4 additions & 10 deletions xml/System.Collections.Generic/Comparer`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@
## Remarks
Implement this method to provide a customized sort order comparison for type `T`.



## Examples
The following example defines a comparer of `Box` objects that can be used instead of the default comparer. This example is part of a larger example provided for the <xref:System.Collections.Generic.Comparer%601> class.

Expand All @@ -246,7 +244,7 @@

]]></format>
</remarks>
<exception cref="T:System.ArgumentException">Type <paramref name="T" /> does not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
<exception cref="T:System.ArgumentException">Type <code>T</code> does not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
<block subset="none" type="overrides">
<para>Comparing <see langword="null" /> with any reference type is allowed and does not generate an exception. A null reference is considered to be less than any reference that is not null.

Expand Down Expand Up @@ -345,16 +343,14 @@
<ReturnType>System.Collections.Generic.Comparer&lt;T&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns a default sort order comparer for the type specified by the generic argument.</summary>
<value>An object that inherits <see cref="T:System.Collections.Generic.Comparer`1" /> and serves as a sort order comparer for type <paramref name="T" />.</value>
<summary>Returns a default sort-order comparer for the type specified by the generic argument.</summary>
<value>An object that inherits <see cref="T:System.Collections.Generic.Comparer`1" /> and serves as a sort-order comparer for type <code>T</code>.</value>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Collections.Generic.Comparer%601> returned by this property uses the <xref:System.IComparable%601?displayProperty=nameWithType> generic interface (`IComparable<T>` in C#, `IComparable(Of T)` in Visual Basic) to compare two objects. If type `T` does not implement the <xref:System.IComparable%601?displayProperty=nameWithType> generic interface, this property returns a <xref:System.Collections.Generic.Comparer%601> that uses the <xref:System.IComparable?displayProperty=nameWithType> interface.



## Examples
The following example shows how to use the <xref:System.Collections.Generic.Comparer%601.Default%2A> property to get an object that performs the default comparison. This example is part of a larger example provided for the <xref:System.Collections.Generic.Comparer%601> class.

Expand Down Expand Up @@ -448,8 +444,6 @@

Comparing `null` with any reference type is allowed and does not generate an exception. When sorting, `null` is considered to be less than any other object.



## Examples
The following example shows how to use the <xref:System.Collections.Generic.Comparer%601.System%23Collections%23IComparer%23Compare%2A> method to compare two objects. This example is part of a larger example provided for the <xref:System.Collections.Generic.Comparer%601> class.

Expand All @@ -460,7 +454,7 @@
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="x" /> or <paramref name="y" /> is of a type that cannot be cast to type <paramref name="T" />.
<paramref name="x" /> or <paramref name="y" /> is of a type that cannot be cast to type <code>T</code>.

-or-

Expand Down
8 changes: 3 additions & 5 deletions xml/System.Collections.Generic/Dictionary`2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2533,13 +2533,13 @@ finally {
<format type="text/markdown"><![CDATA[

## Remarks

You can also use the <xref:System.Collections.IDictionary.Item%2A> property to add new elements by setting the value of a key that does not exist in the dictionary; for example, `myCollection["myNonexistentKey"] = myValue`. However, if the specified key already exists in the dictionary, setting the <xref:System.Collections.IDictionary.Item%2A> property overwrites the old value. In contrast, the <xref:System.Collections.IDictionary.Add%2A> method throws an exception if the specified key already exists.

If <xref:System.Collections.Generic.Dictionary%602.Count%2A> is less than the capacity, this method approaches an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(`n`) operation, where `n` is <xref:System.Collections.Generic.Dictionary%602.Count%2A>.



## Examples

The following code example shows how to access the <xref:System.Collections.Generic.Dictionary%602> class through the <xref:System.Collections.IDictionary?displayProperty=nameWithType> interface. The code example creates an empty <xref:System.Collections.Generic.Dictionary%602> of strings with string keys and uses the <xref:System.Collections.Generic.Dictionary%602.System%23Collections%23IDictionary%23Add%2A> method to add some elements. The example demonstrates that the <xref:System.Collections.Generic.Dictionary%602.System%23Collections%23IDictionary%23Add%2A> method throws an <xref:System.ArgumentException> when attempting to add a duplicate key, or when a key or value of the wrong data type is supplied.

The code example demonstrates the use of several other members of the <xref:System.Collections.IDictionary?displayProperty=nameWithType> interface.
Expand Down Expand Up @@ -2907,8 +2907,6 @@ finally {

Getting or setting the value of this property approaches an O(1) operation.



## Examples
The following code example shows how to use the <xref:System.Collections.Generic.Dictionary%602.System%23Collections%23IDictionary%23Item%2A> property (the indexer in C#) of the <xref:System.Collections.IDictionary?displayProperty=nameWithType> interface with a <xref:System.Collections.Generic.Dictionary%602>, and ways the property differs from the <xref:System.Collections.Generic.Dictionary%602.Item%2A?displayProperty=nameWithType> property.

Expand Down Expand Up @@ -2936,7 +2934,7 @@ finally {

-or-

A value is being assigned, and <paramref name="value" /> is of a type that is not assignable to the value type <paramref name="TValue" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception>
A value is being assigned and is of a type that isn't assignable to the value type <paramref name="TValue" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception>
<altmember cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)" />
</Docs>
</Member>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Collections.Generic/HashSet`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ The following example demonstrates how to merge two disparate sets. This example

-or-

<paramref name="count" /> is greater than the available space from the <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
<paramref name="count" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
</Docs>
</Member>
<Member MemberName="Count">
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Collections.Generic/List`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5027,7 +5027,7 @@ finally
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
<exception cref="T:System.ArgumentException">The property is set and <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
<exception cref="T:System.ArgumentException">The property is set and the value is of a type that isn't assignable to the <see cref="T:System.Collections.IList" />.</exception>
</Docs>
</Member>
<Member MemberName="System.Collections.IList.Remove">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<param name="key">They key to the location in the collection.</param>
<summary>Determines whether the <see cref="T:System.Collections.Generic.ICollection`1" /> contains a specific value.</summary>
<returns>
<see langword="true" /> if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, <see langword="false" />.</returns>
<see langword="true" /> if <paramref name="key" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<inheritdoc />
</Docs>
Expand Down
Loading
Loading