Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2e9568

Browse files
authored
Added documentation for APIs in System.Net namespace introduced in 2.x (dotnet#3280)
* Added documentation for APIs in System.Net namespace introduced in 2.x * Apply some suggestions from code review Co-Authored-By: Maira Wenzel <[email protected]> Co-Authored-By: Cory Nelson <[email protected]> * avoid CI edit * Address moving paragraph from remarks to param tag
1 parent e3d2921 commit d2e9568

File tree

3 files changed

+67
-27
lines changed

3 files changed

+67
-27
lines changed

xml/System.Net/FtpWebResponse.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,18 @@
247247
<ReturnType>System.String</ReturnType>
248248
</ReturnValue>
249249
<Docs>
250-
<summary>To be added.</summary>
251-
<value>To be added.</value>
252-
<remarks>To be added.</remarks>
250+
<summary>Throws a <see cref="T:System.NotImplementedException" /> in all cases.</summary>
251+
<value>Throws a <see cref="T:System.NotImplementedException" /> in all cases.</value>
252+
<remarks>
253+
<format type="text/markdown"><![CDATA[
254+
255+
## Remarks
256+
257+
This property is provided only for compatibility with other implementations of the <xref:System.Net.WebRequest> and <xref:System.Net.WebResponse> classes.
258+
259+
]]></format>
260+
</remarks>
261+
<exception cref="T:System.NotImplementedException">In all cases.</exception>
253262
</Docs>
254263
</Member>
255264
<Member MemberName="ExitMessage">

xml/System.Net/HttpVersion.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<ReturnType>System.Version</ReturnType>
103103
</ReturnValue>
104104
<Docs>
105-
<summary>To be added.</summary>
105+
<summary>Defines a <see cref="T:System.Version" /> instance for an unknown HTTP version.</summary>
106106
<remarks>To be added.</remarks>
107107
</Docs>
108108
</Member>
@@ -196,7 +196,7 @@
196196
<ReturnType>System.Version</ReturnType>
197197
</ReturnValue>
198198
<Docs>
199-
<summary>To be added.</summary>
199+
<summary>Defines a <see cref="T:System.Version" /> instance for HTTP 2.0.</summary>
200200
<remarks>To be added.</remarks>
201201
</Docs>
202202
</Member>

xml/System.Net/IPAddress.xml

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,20 @@
196196
<Parameter Name="address" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
197197
</Parameters>
198198
<Docs>
199-
<param name="address">To be added.</param>
200-
<summary>To be added.</summary>
201-
<remarks>To be added.</remarks>
199+
<param name="address">The byte representation of the IP address, in network byte order, with the most significant byte first in index position 0.</param>
200+
<summary>Initializes a new instance of the <see cref="T:System.Net.IPAddress" /> class with the address specified as a byte span.</summary>
201+
<remarks>
202+
<format type="text/markdown"><![CDATA[
203+
204+
## Remarks
205+
The <xref:System.Net.IPAddress> is created with the <xref:System.Net.IPAddress.Address> property set to `address`.
206+
207+
If the length of `address` is 4, this method constructs an IPv4 address; otherwise, an IPv6 address with a scope of 0 is constructed.
208+
209+
]]></format>
210+
</remarks>
211+
<exception cref="T:System.ArgumentException">
212+
<paramref name="address" /> contains a bad IP address.</exception>
202213
</Docs>
203214
</Member>
204215
<Member MemberName=".ctor">
@@ -285,10 +296,27 @@
285296
<Parameter Name="scopeid" Type="System.Int64" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
286297
</Parameters>
287298
<Docs>
288-
<param name="address">To be added.</param>
289-
<param name="scopeid">To be added.</param>
290-
<summary>To be added.</summary>
291-
<remarks>To be added.</remarks>
299+
<param name="address">The byte span value of the IP address.</param>
300+
<param name="scopeid">The long value of the scope identifier.</param>
301+
<summary>Initializes a new instance of the <see cref="T:System.Net.IPAddress" /> class with the address specified as a byte span and the specified scope identifier.</summary>
302+
<remarks>
303+
<format type="text/markdown"><![CDATA[
304+
305+
## Remarks
306+
This constructor instantiates an IPv6 address. The `scopeid` identifies a network interface in the case of a link-local address. The scope is valid only for link-local and site-local addresses.
307+
308+
The byte span is assumed to be in network byte order with the most significant byte first in index position 0.
309+
310+
]]></format>
311+
</remarks>
312+
<exception cref="T:System.ArgumentException">
313+
<paramref name="address" /> contains a bad IP address.</exception>
314+
<exception cref="T:System.ArgumentOutOfRangeException">
315+
<paramref name="scopeid" /> &lt; 0
316+
317+
-or-
318+
319+
<paramref name="scopeid" /> &gt; 0x00000000FFFFFFFF</exception>
292320
</Docs>
293321
</Member>
294322
<Member MemberName="Address">
@@ -1686,10 +1714,12 @@
16861714
<Parameter Name="ipString" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
16871715
</Parameters>
16881716
<Docs>
1689-
<param name="ipString">To be added.</param>
1690-
<summary>To be added.</summary>
1691-
<returns>To be added.</returns>
1717+
<param name="ipString">A character span that contains an IP address in dotted-quad notation for IPv4 and in colon-hexadecimal notation for IPv6.</param>
1718+
<summary>Converts an IP address represented as a character span to an <see cref="T:System.Net.IPAddress" /> instance.</summary>
1719+
<returns>The converted IP address.</returns>
16921720
<remarks>To be added.</remarks>
1721+
<exception cref="T:System.FormatException">
1722+
<paramref name="ipString" /> is not a valid IP address.</exception>
16931723
</Docs>
16941724
</Member>
16951725
<Member MemberName="Parse">
@@ -1917,10 +1947,10 @@
19171947
<Parameter Name="charsWritten" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
19181948
</Parameters>
19191949
<Docs>
1920-
<param name="destination">To be added.</param>
1921-
<param name="charsWritten">To be added.</param>
1922-
<summary>To be added.</summary>
1923-
<returns>To be added.</returns>
1950+
<param name="destination">When this method returns, the IP address as a span of characters.</param>
1951+
<param name="charsWritten">When this method returns, the number of characters written into the span.</param>
1952+
<summary>Tries to format the current IP address into the provided span.</summary>
1953+
<returns><see langword="true" /> if the formatting was successful; otherwise, <see langword="false" />.</returns>
19241954
<remarks>To be added.</remarks>
19251955
</Docs>
19261956
</Member>
@@ -1954,10 +1984,10 @@
19541984
<Parameter Name="address" Type="System.Net.IPAddress" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
19551985
</Parameters>
19561986
<Docs>
1957-
<param name="ipString">To be added.</param>
1958-
<param name="address">To be added.</param>
1959-
<summary>To be added.</summary>
1960-
<returns>To be added.</returns>
1987+
<param name="ipString">The byte span to validate.</param>
1988+
<param name="address">When this method returns, the <see cref="T:System.Net.IPAddress" /> version of the byte span.</param>
1989+
<summary>Determines whether the specified byte span represents a valid IP address.</summary>
1990+
<returns><see langword="true" /> if <paramref name="ipString" /> was able to be parsed as an IP address; otherwise, <see langword="false" />.</returns>
19611991
<remarks>To be added.</remarks>
19621992
</Docs>
19631993
</Member>
@@ -2044,10 +2074,11 @@
20442074
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
20452075
</Parameters>
20462076
<Docs>
2047-
<param name="destination">To be added.</param>
2048-
<param name="bytesWritten">To be added.</param>
2049-
<summary>To be added.</summary>
2050-
<returns>To be added.</returns>
2077+
<param name="destination">When this method returns, the IP address as a span of bytes.</param>
2078+
<param name="bytesWritten">When this method returns, the number of bytes written into the span.</param>
2079+
<summary>Tries to write the current IP address into a span of bytes.</summary>
2080+
<returns>
2081+
<see langword="true" /> if the IP address is sucessfully written to the given span; otherwise, <see langword="false" />.</returns>
20512082
<remarks>To be added.</remarks>
20522083
</Docs>
20532084
</Member>

0 commit comments

Comments
 (0)