Skip to content
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
68 changes: 49 additions & 19 deletions xml/System.Net/CookieCollection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<summary>Removes all elements from the <see cref="T:System.Net.CookieCollection" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -291,10 +291,19 @@
<Parameter Name="cookie" Type="System.Net.Cookie" Index="0" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="cookie">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="cookie">The cookie to locate in the <see cref="T:System.Net.CookieCollection" />.</param>
<summary>Determines whether the specified cookie is in the <see cref="T:System.Net.CookieCollection" />.</summary>
<returns><see langword="true" /> if the specified cookie is found in the <see cref="T:System.Net.CookieCollection" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The `cookie` is determined to be part of the collection if <xref:System.Net.Cookie.Name%2A>, <xref:System.Net.Cookie.Domain%2A> and <xref:System.Net.Cookie.Path%2A> match.
The comparison for <xref:System.Net.Cookie.Name%2A> and <xref:System.Net.Cookie.Domain%2A> is case-insensitive.
The comparison for <xref:System.Net.Cookie.Path%2A> is case-sensitive.

]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="CopyTo">
Expand Down Expand Up @@ -345,9 +354,9 @@
<Parameter Name="index" Type="System.Int32" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="array">The target <see cref="T:System.Array" /> to which the <see cref="T:System.Net.CookieCollection" /> will be copied.</param>
<param name="index">The zero-based index in the target <see cref="T:System.Array" /> where copying begins.</param>
<summary>Copies the elements of a <see cref="T:System.Net.CookieCollection" /> to an instance of the <see cref="T:System.Array" /> class, starting at a particular index.</summary>
<param name="array">The target array to which the <see cref="T:System.Net.CookieCollection" /> will be copied.</param>
<param name="index">The zero-based index in the target array where copying begins.</param>
<summary>Copies the elements of a <see cref="T:System.Net.CookieCollection" /> to the specified array, starting at a particular index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -405,13 +414,13 @@
</Parameters>
<Docs>
<param name="array">The target <see cref="T:System.Net.Cookie" /> array to which the <see cref="T:System.Net.CookieCollection" /> will be copied.</param>
<param name="index">The zero-based index in the target <see cref="T:System.Array" /> where copying begins.</param>
<param name="index">The zero-based index in the target array where copying begins.</param>
<summary>Copies the elements of this <see cref="T:System.Net.CookieCollection" /> to a <see cref="T:System.Net.Cookie" /> array starting at the specified index of the target array.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Array>`array` parameter must be one-dimensional with zero-based indexing.
The `array` parameter must be one-dimensional with zero-based indexing.

]]></format>
</remarks>
Expand Down Expand Up @@ -515,7 +524,7 @@
<Parameters />
<Docs>
<summary>Gets an enumerator that can iterate through a <see cref="T:System.Net.CookieCollection" />.</summary>
<returns>An instance of an implementation of an <see cref="T:System.Collections.IEnumerator" /> interface that can iterate through a <see cref="T:System.Net.CookieCollection" />.</returns>
<returns>An <see cref="T:System.Collections.IEnumerator" /> for this collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -778,10 +787,20 @@
<Parameter Name="cookie" Type="System.Net.Cookie" Index="0" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="cookie">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="cookie">The cookie to remove from the <see cref="T:System.Net.CookieCollection" />.</param>
<summary>Removes the specified cookie from the <see cref="T:System.Net.CookieCollection" />.</summary>
<returns><see langword="true" /> if <paramref name="cookie" /> was successfully removed from the <see cref="T:System.Net.CookieCollection" />; otherwise, <see langword="false" />. This method also returns <see langword="false" /> if item is not found in the original collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The `cookie` is determined to be part of the collection if <xref:System.Net.Cookie.Name%2A>, <xref:System.Net.Cookie.Domain%2A> and <xref:System.Net.Cookie.Path%2A> match.

The comparison for <xref:System.Net.Cookie.Name%2A> and <xref:System.Net.Cookie.Domain%2A> is case-insensitive.

The comparison for <xref:System.Net.Cookie.Path%2A> is case-sensitive.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SyncRoot">
Expand Down Expand Up @@ -860,9 +879,20 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Gets an enumerator that can iterate through the <see cref="T:System.Net.CookieCollection" />.</summary>
<returns>An <see cref="T:System.Collections.Generic.IEnumerator`1" /> for this collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
You should use an <xref:System.Collections.Generic.IEnumerator%601> only to read data in the collection. Enumerators cannot be used to modify the underlying collection. The enumerator does not have exclusive access to the collection.

When an enumerator is created, it takes a snapshot of the current state of the collection. If changes are made to the collection, such as adding, modifying, or deleting elements, this snapshot gets out of sync and the enumerator throws an <xref:System.InvalidOperationException>. Two enumerators created from the same collection at the same time can produce different snapshots of the collection.

This member is an explicit interface member implementation. It can be used only when the <xref:System.Net.CookieCollection> instance is cast to an <xref:System.Collections.Generic.IEnumerable%601> interface.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.CopyTo">
Expand Down Expand Up @@ -974,4 +1004,4 @@
</Docs>
</Member>
</Members>
</Type>
</Type>
43 changes: 36 additions & 7 deletions xml/System.Net/FileWebRequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -717,9 +717,26 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Returns a stream for writing data to the file system resource as an asynchronous operation.</summary>
<returns>The task object representing the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

> [!NOTE]
> In the case of asynchronous requests, the client application is responsible for implementing its own time-out mechanism.

]]>
</format>
</remarks>
<exception cref="T:System.InvalidOperationException">The stream is being used by a previous call to <see cref="M:System.Net.FileWebRequest.BeginGetRequestStream(System.AsyncCallback,System.Object)"/>.

-or-

The stream already received a response previous to your request.</exception>
<exception cref="T:System.Net.ProtocolViolationException">The <see cref="P:System.Net.FileWebRequest.Method" /> property is GET or HEAD.</exception>
<exception cref="T:System.Net.WebException">The <see cref="T:System.Net.FileWebRequest" /> was aborted.</exception>
</Docs>
</Member>
<Member MemberName="GetResponse">
Expand Down Expand Up @@ -799,9 +816,21 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Returns a response to a file system request as an asynchronous operation.</summary>
<returns>The task object representing the asynchronous operation.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

> [!NOTE]
> In the case of asynchronous requests, the client application is responsible for implementing its own time-out mechanism.

]]>
</format>
</remarks>
<exception cref="T:System.InvalidOperationException">The stream is already in use by a previous call to <see cref="M:System.Net.FileWebRequest.BeginGetResponse(System.AsyncCallback,System.Object)" />.</exception>
<exception cref="T:System.Net.WebException">The <see cref="M:System.Net.FileWebRequest" /> was aborted.</exception>
</Docs>
</Member>
<Member MemberName="Headers">
Expand Down Expand Up @@ -1198,4 +1227,4 @@
</Docs>
</Member>
</Members>
</Type>
</Type>
85 changes: 70 additions & 15 deletions xml/System.Net/IPEndPoint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,32 @@
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Parse">
<Docs>
<summary>To be added.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

The number of parts (each part is separated by a period) in `s` determines how the endpoint's IP address is constructed. A one-part address is stored directly in the network address. A two-part address, convenient for specifying a class A address, puts the leading part in the first byte and the trailing part in the right-most three bytes of the network address. A three-part address, convenient for specifying a class B address, puts the first part in the first byte, the second part in the second byte, and the final part in the right-most two bytes of the network address. For example:

|Number of parts and example `s`|IPv4 address for IPEndPoint.Address|Port|
|-------------------------|--------------------------------|-------------------------|
|1 -- "1"|0.0.0.1|0|
|2 -- "20.2:80"|20.0.0.2|80|
|2 -- "20.65535:23"|20.0.255.255|23|
|3 -- "128.1.2:443"|128.1.0.2|443|

> [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an <xref:System.Int64>, and then treats that <xref:System.Int64> as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.

Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.

]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public static System.Net.IPEndPoint Parse (ReadOnlySpan&lt;char&gt; s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Net.IPEndPoint Parse(valuetype System.ReadOnlySpan`1&lt;char&gt; s) cil managed" />
Expand Down Expand Up @@ -568,10 +594,12 @@
<Parameter Name="s" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="s">A read-only span that contains an IP endpoint in dotted-quad notation or network byte order for IPv4 and in colon-hexadecimal notation for IPv6.</param>
<summary>Converts an IP network endpoint (address and port) represented as a read-only span to an <see cref="T:System.Net.IPEndPoint" /> instance.</summary>
<returns>The object representation of an IP network endpoint.</returns>
<remarks>To be added.</remarks>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarks still todo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since overloads are generated in the same html, for this case and TryParse I think it would be redundant to have practically the same remarks twice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's good. But if they are applicable to both, the best would be to create a MemberGroup element and add the remarks there.

Here's an example I did this for:
6950528
https://docs.microsoft.com/en-us/dotnet/api/windows.foundation.point.tostring?view=dotnet-uwp-10.0

Otherwise, only one of the overloads have those remarks:
https://review.docs.microsoft.com/en-us/dotnet/api/system.net.ipendpoint.tryparse?view=netcore-3.0&branch=pr-en-us-2663#System_Net_IPEndPoint_TryParse_System_String_System_Net_IPEndPoint__

I can help you to format that in this PR if you'd like.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarks are optional, @scalablecory

<exception cref="T:System.ArgumentNullException"><paramref name="s" /> is <see langword="null" />.</exception>
<exception cref="T:System.FormatException"><paramref name="s" /> is not a valid IP endpoint.</exception>
</Docs>
</Member>
<Member MemberName="Parse">
Expand Down Expand Up @@ -602,10 +630,12 @@
<Parameter Name="s" Type="System.String" Index="0" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="s">A string that contains an IP endpoint in dotted-quad notation or network byte order for IPv4 and in colon-hexadecimal notation for IPv6.</param>
<summary>Converts an IP network endpoint (address and port) represented as a string to an <see cref="T:System.Net.IPEndPoint" /> instance.</summary>
<returns>The object representation of an IP network endpoint.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException"><paramref name="s" /> is <see langword="null" />.</exception>
<exception cref="T:System.FormatException"><paramref name="s" /> is not a valid IP endpoint.</exception>
</Docs>
</Member>
<Member MemberName="Port">
Expand Down Expand Up @@ -764,6 +794,31 @@
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="TryParse">
<Docs>
<summary>To be added.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The number of parts (each part is separated by a period) in `s` determines how the endpoint's IP address is constructed. A one-part address is stored directly in the network address. A two-part address, convenient for specifying a class A address, puts the leading part in the first byte and the trailing part in the right-most three bytes of the network address. A three-part address, convenient for specifying a class B address, puts the first part in the first byte, the second part in the second byte, and the final part in the right-most two bytes of the network address. For example:

|Number of parts and example `s`|IPv4 address for IPEndPoint.Address|Port|
|-------------------------|--------------------------------|-------------------------|
|1 -- "1"|0.0.0.1|0|
|2 -- "20.2:80"|20.0.0.2|80|
|2 -- "20.65535:23"|20.0.255.255|23|
|3 -- "128.1.2:443"|128.1.0.2|443|

> [!IMPORTANT]
> Note that this method accepts as valid a value that can be parsed as an <xref:System.Int64>, and then treats that <xref:System.Int64> as the long value of an IP address in network byte order, similar to the way that the IPAddress constructor does. This means that this method returns true if the Int64 is parsed successfully, even if it represents an address that's not a valid IP address. For example, if s is "1", this method returns true even though "1" (or 0.0.0.1) is not a valid IP address and you might expect this method to return false. Fixing this bug would break existing apps, so the current behavior will not be changed. Your code can avoid this behavior by ensuring that it only uses this method to parse IP addresses in dotted-decimal format.

Literal IPv6 addresses require to be enclosed in square brackets [] when passing an endpoint that specifies a port number; otherwise, square braces are not mandatory.

]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="TryParse">
<MemberSignature Language="C#" Value="public static bool TryParse (ReadOnlySpan&lt;char&gt; s, out System.Net.IPEndPoint result);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryParse(valuetype System.ReadOnlySpan`1&lt;char&gt; s, [out] class System.Net.IPEndPoint&amp; result) cil managed" />
Expand Down Expand Up @@ -793,10 +848,10 @@
<Parameter Name="result" Type="System.Net.IPEndPoint" RefType="out" Index="1" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="s">The IP endpoint to validate.</param>
<param name="result">When this method returns, the <see cref="T:System.Net.IPEndPoint" /> version of <paramref name="s" />.</param>
<summary>Tries to convert an IP network endpoint (address and port) represented as a read-only span to its <see cref="T:System.Net.IPEndPoint" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
<returns><see langword="true" /> if <paramref name="s" /> can be parsed as an IP endpoint; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -829,12 +884,12 @@
<Parameter Name="result" Type="System.Net.IPEndPoint" RefType="out" Index="1" FrameworkAlternate="netcore-3.0" />
</Parameters>
<Docs>
<param name="s">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<param name="s">The IP endpoint to validate.</param>
<param name="result">When this method returns, the <see cref="T:System.Net.IPEndPoint" /> version of <paramref name="s" />.</param>
<summary>Tries to convert an IP network endpoint (address and port) represented as a string to its <see cref="T:System.Net.IPEndPoint" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
<returns><see langword="true" /> if <paramref name="s" /> can be parsed as an IP endpoint; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
</Type>