Skip to content

Commit a0f6e0b

Browse files
author
Ron Petrusha
authored
Merge pull request #2568 from rpetrusha/stdfmt
Documented StandardFormat structure
2 parents 4fc5da1 + 5ae9807 commit a0f6e0b

File tree

1 file changed

+112
-52
lines changed

1 file changed

+112
-52
lines changed

xml/System.Buffers/StandardFormat.xml

Lines changed: 112 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,14 @@
2929
</Attribute>
3030
</Attributes>
3131
<Docs>
32-
<summary>To be added.</summary>
33-
<remarks>To be added.</remarks>
32+
<summary>Represents a standard format string without using an actual string.</summary>
33+
<remarks>
34+
<format type="text/markdown"><![CDATA[
35+
36+
A `StandardFormat` object consists of a single character standard format specifier (such as 'G', 'D', or 'X') and an optional precision specifier. The precision specifier can range from 0 to 9, or it can be the special <xref:System.Buffers.StandardFormat.NoPrecision?displayProperty=nameWithType> value.
37+
38+
]]></format>
39+
</remarks>
3440
</Docs>
3541
<Members>
3642
<Member MemberName=".ctor">
@@ -55,12 +61,41 @@
5561
<Parameter Name="precision" Type="System.Byte" />
5662
</Parameters>
5763
<Docs>
58-
<param name="symbol">To be added.</param>
59-
<param name="precision">To be added.</param>
60-
<summary>To be added.</summary>
64+
<param name="symbol">A type-specific format specifier, such as 'G', 'D', or 'X'.</param>
65+
<param name="precision">An optional precision ranging from 0 to 99, or the special value <see cref="F:System.Buffers.StandardFormat.NoPrecision" /> (the default).</param>
66+
<summary>Initializes a new instance of the <see cref="T:System.Buffers.StandardFormat" /> structure.</summary>
6167
<remarks>To be added.</remarks>
68+
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="symbol" /> is not <see cref="F:System.Buffers.StandardFormat.NoPrecision" />, and its value is greater than <see cref="F:System.Buffers.StandardFormat.MaxPrecision" />.
69+
70+
-or-
71+
72+
<paramref name="symbol" /> cannot be converted to a <see cref="T:System.Byte" />.
73+
74+
</exception>
6275
</Docs>
6376
</Member>
77+
<MemberGroup MemberName="Equals">
78+
<AssemblyInfo>
79+
<AssemblyName>System.Memory</AssemblyName>
80+
<AssemblyVersion>4.0.1.0</AssemblyVersion>
81+
<AssemblyVersion>4.1.0.0</AssemblyVersion>
82+
<AssemblyVersion>4.2.0.0</AssemblyVersion>
83+
</AssemblyInfo>
84+
<AssemblyInfo>
85+
<AssemblyName>netstandard</AssemblyName>
86+
<AssemblyVersion>2.1.0.0</AssemblyVersion>
87+
</AssemblyInfo>
88+
<Docs>
89+
<summary>Returns a value that indicates whether this instance is equal to a specified object or <see cref="T:System.Buffers.StandardFormat" />.</summary>
90+
<remarks>
91+
<format type="text/markdown"><![CDATA[
92+
93+
Two <xref:System.Buffers.StandardFormat> instances are equal if their <xref:System.Buffers.StandardFormat.Symbol> and <xref:System.Buffers.StandardFormat.Precision> properties are equal.
94+
95+
]]></format>
96+
</remarks>
97+
</Docs>
98+
</MemberGroup>
6499
<Member MemberName="Equals">
65100
<MemberSignature Language="C#" Value="public bool Equals (System.Buffers.StandardFormat other);" />
66101
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Equals(valuetype System.Buffers.StandardFormat other) cil managed" />
@@ -90,8 +125,8 @@
90125
</Parameters>
91126
<Docs>
92127
<param name="other">To be added.</param>
93-
<summary>To be added.</summary>
94-
<returns>To be added.</returns>
128+
<summary>Returns a value that indicates whether the specified <see cref="T:System.Buffers.StandardFormat" /> is equal to the current instance.</summary>
129+
<returns><see langword="true" /> if the two instances are equal; otherwise, <see langword="false" />.</returns>
95130
<remarks>To be added.</remarks>
96131
</Docs>
97132
</Member>
@@ -120,10 +155,10 @@
120155
<Parameter Name="obj" Type="System.Object" />
121156
</Parameters>
122157
<Docs>
123-
<param name="obj">To be added.</param>
124-
<summary>To be added.</summary>
125-
<returns>To be added.</returns>
126-
<remarks>To be added.</remarks>
158+
<param name="obj">An object to compare to the current instance.</param>
159+
<summary>Returns a value that indicates whether the specified object is a <see cref="T:System.Buffers.StandardFormat" /> object that is equal to the current instance.</summary>
160+
<returns><see langword="true" /> if the two instances are equal; otherwise, <see langword="false" />.</returns>
161+
<remarks>To be added.</remarks>
127162
</Docs>
128163
</Member>
129164
<Member MemberName="GetHashCode">
@@ -149,8 +184,8 @@
149184
</ReturnValue>
150185
<Parameters />
151186
<Docs>
152-
<summary>To be added.</summary>
153-
<returns>To be added.</returns>
187+
<summary>Returns the hash code for this instance.</summary>
188+
<returns>The hash code for this instance.</returns>
154189
<remarks>To be added.</remarks>
155190
</Docs>
156191
</Member>
@@ -176,8 +211,8 @@
176211
<ReturnType>System.Boolean</ReturnType>
177212
</ReturnValue>
178213
<Docs>
179-
<summary>To be added.</summary>
180-
<value>To be added.</value>
214+
<summary>Gets a value that indicates whether a format has a defined precision.</summary>
215+
<value><see langword="true" /> if the format has a precision other than <see cref="F:System.Buffers.StandardFormat.NoPrecision" />; otherwise, <see langword="false" />.</value>
181216
<remarks>To be added.</remarks>
182217
</Docs>
183218
</Member>
@@ -203,9 +238,15 @@
203238
<ReturnType>System.Boolean</ReturnType>
204239
</ReturnValue>
205240
<Docs>
206-
<summary>To be added.</summary>
207-
<value>To be added.</value>
208-
<remarks>To be added.</remarks>
241+
<summary>Gets a value that indicates whether the current instance is a default format.</summary>
242+
<value><see langword="true" /> if the current instance is a default format; otherwise, <see langword="false" />.</value>
243+
<remarks>
244+
<format type="text/markdown"><![CDATA[
245+
246+
A default format has a format specifier whose <xref:System.Byte> value is 0 and whose precision is <xref:System.Buffers.StandardFormat.NoPrecision>.
247+
248+
]]></format>
249+
</remarks>
209250
</Docs>
210251
</Member>
211252
<Member MemberName="MaxPrecision">
@@ -231,8 +272,8 @@
231272
</ReturnValue>
232273
<MemberValue>99</MemberValue>
233274
<Docs>
234-
<summary>To be added.</summary>
235-
<remarks>To be added.</remarks>
275+
<summary>Defines the maximum valid precision value.</summary>
276+
<remarks>The maximum valid precision is 99.</remarks>
236277
</Docs>
237278
</Member>
238279
<Member MemberName="NoPrecision">
@@ -258,7 +299,7 @@
258299
</ReturnValue>
259300
<MemberValue>255</MemberValue>
260301
<Docs>
261-
<summary>To be added.</summary>
302+
<summary>Indicates that a format doesn't use a precision or that the precision is unspecified.</summary>
262303
<remarks>To be added.</remarks>
263304
</Docs>
264305
</Member>
@@ -288,11 +329,17 @@
288329
<Parameter Name="right" Type="System.Buffers.StandardFormat" />
289330
</Parameters>
290331
<Docs>
291-
<param name="left">To be added.</param>
292-
<param name="right">To be added.</param>
293-
<summary>To be added.</summary>
294-
<returns>To be added.</returns>
295-
<remarks>To be added.</remarks>
332+
<param name="left">The first format to compare.</param>
333+
<param name="right">The second format to compare.</param>
334+
<summary>Returns a value that indicates whether two <see cref="T:System.Buffers.StandardFormat" /> instances are equal.</summary>
335+
<returns><see langword="true" /> if the two instances are equal; otherwise, <see langword="false" />.</returns>
336+
<remarks>
337+
<format type="text/markdown"><![CDATA[
338+
339+
Two <xref:System.Buffers.StandardFormat> instances are equal if their <xref:System.Buffers.StandardFormat.Symbol> and <xref:System.Buffers.StandardFormat.Precision> properties are equal.
340+
341+
]]></format>
342+
</remarks>
296343
</Docs>
297344
</Member>
298345
<Member MemberName="op_Implicit">
@@ -320,9 +367,9 @@
320367
<Parameter Name="symbol" Type="System.Char" />
321368
</Parameters>
322369
<Docs>
323-
<param name="symbol">To be added.</param>
324-
<summary>To be added.</summary>
325-
<returns>To be added.</returns>
370+
<param name="symbol">The character to convert to a <see cref="T:System.Buffers.StandardFormat" /> value.</param>
371+
<summary>Converts a character to a <see cref="T:System.Buffers.StandardFormat" /> instance using <see cref="F:System.Buffers.StandardFormat.NoPrecision" /> precision.</summary>
372+
<returns>A format with a <see cref="P:System.Buffers.StandardFormat.Symbol" /> property equal to <paramref name="symbol" /> and a <see cref="P:System.Buffers.StandardFormat.Precision" /> property equal to <see cref="F:System.Buffers.StandardFormat.NoPrecision" />.</returns>
326373
<remarks>To be added.</remarks>
327374
</Docs>
328375
</Member>
@@ -352,11 +399,17 @@
352399
<Parameter Name="right" Type="System.Buffers.StandardFormat" />
353400
</Parameters>
354401
<Docs>
355-
<param name="left">To be added.</param>
356-
<param name="right">To be added.</param>
357-
<summary>To be added.</summary>
358-
<returns>To be added.</returns>
359-
<remarks>To be added.</remarks>
402+
<param name="left">The first format to compare.</param>
403+
<param name="right">The second format to compare.</param>
404+
<summary>Determines whether two <see cref="T:System.Buffers.StandardFormat" /> instances are unequal.</summary>
405+
<returns><see langword="true" /> if the two formats are unequal; otherwise, <see langword="false" />.</returns>
406+
<remarks>
407+
<format type="text/markdown"><![CDATA[
408+
409+
Two <xref:System.Buffers.StandardFormat> instances are unequal if their <xref:System.Buffers.StandardFormat.Symbol> and <xref:System.Buffers.StandardFormat.Precision> properties are not identical.
410+
411+
]]></format>
412+
</remarks>
360413
</Docs>
361414
</Member>
362415
<Member MemberName="Parse">
@@ -384,9 +437,9 @@
384437
<Parameter Name="format" Type="System.ReadOnlySpan&lt;System.Char&gt;" />
385438
</Parameters>
386439
<Docs>
387-
<param name="format">To be added.</param>
388-
<summary>To be added.</summary>
389-
<returns>To be added.</returns>
440+
<param name="format">A read-only span that contains the character to parse.</param>
441+
<summary>Converts a <see langword="ReadOnlySpan&lt;System.Char&gt;" /> into a <see cref="T:System.Buffers.StandardFormat" /> instance using <see cref="F:System.Buffers.StandardFormat.NoPrecision" /> precision.</summary>
442+
<returns>A value whose <see cref="P:System.Buffers.StandardFormat.Symbol" /> property value is the character in <paramref name="format" /> and whose <see cref="P:System.Buffers.StandardFormat.Precision" /> property value is <see cref="F:System.Buffers.StandardFormat.NoPrecision" />.</returns>
390443
<remarks>To be added.</remarks>
391444
</Docs>
392445
</Member>
@@ -415,10 +468,11 @@
415468
<Parameter Name="format" Type="System.String" />
416469
</Parameters>
417470
<Docs>
418-
<param name="format">To be added.</param>
419-
<summary>To be added.</summary>
420-
<returns>To be added.</returns>
471+
<param name="format">A classic .NET standard format string.</param>
472+
<summary>Converts a classic .NET standard format string to a <see cref="T:System.Buffers.StandardFormat" /> instance.</summary>
473+
<returns>A format.</returns>
421474
<remarks>To be added.</remarks>
475+
<exception cref="T:System.FormatException"><paramref name="format" /> is not a valid standard format string.</exception>
422476
</Docs>
423477
</Member>
424478
<Member MemberName="Precision">
@@ -443,8 +497,8 @@
443497
<ReturnType>System.Byte</ReturnType>
444498
</ReturnValue>
445499
<Docs>
446-
<summary>To be added.</summary>
447-
<value>To be added.</value>
500+
<summary>Gets the precision component of the format.</summary>
501+
<value>The precision component, which can be <see cref="F:System.Buffers.StandardFormat.NoPrecision" />, or can range from 0 to 9.</value>
448502
<remarks>To be added.</remarks>
449503
</Docs>
450504
</Member>
@@ -470,8 +524,8 @@
470524
<ReturnType>System.Char</ReturnType>
471525
</ReturnValue>
472526
<Docs>
473-
<summary>To be added.</summary>
474-
<value>To be added.</value>
527+
<summary>Gets the character component of the format.</summary>
528+
<value>The character component of the format.</value>
475529
<remarks>To be added.</remarks>
476530
</Docs>
477531
</Member>
@@ -498,9 +552,15 @@
498552
</ReturnValue>
499553
<Parameters />
500554
<Docs>
501-
<summary>To be added.</summary>
502-
<returns>To be added.</returns>
503-
<remarks>To be added.</remarks>
555+
<summary>Returns the string representation of this format.</summary>
556+
<returns>The string representation of this format.</returns>
557+
<remarks>
558+
<format type="text/markdown"><![CDATA[
559+
560+
The string representation of a <xref:System.Buffers.StandardFormat> instance is a standard .NET format string.
561+
562+
]]></format>
563+
</remarks>
504564
</Docs>
505565
</Member>
506566
<Member MemberName="TryParse">
@@ -526,12 +586,12 @@
526586
<Parameter Name="result" Type="System.Buffers.StandardFormat" RefType="out" Index="1" FrameworkAlternate="netcore-3.0" />
527587
</Parameters>
528588
<Docs>
529-
<param name="format">To be added.</param>
530-
<param name="result">To be added.</param>
531-
<summary>To be added.</summary>
532-
<returns>To be added.</returns>
589+
<param name="format">A read-only span that contains the character to convert.</param>
590+
<param name="result">When the method returns, contains the parsed <see cref="T:System.Buffers.StandardFormat" /> instance if the operation was successful.</param>
591+
<summary>Attempts to convert a <see langword="ReadOnlySpan&lt;Char&gt;" /> to a <see cref="T:System.Buffers.StandardFormat" /> instance and returns a value that indicates whether the parsing operation succeeded.</summary>
592+
<returns><see langword="true" /> if the parsing operation was successful; otherwise, <see langword="false" />.</returns>
533593
<remarks>To be added.</remarks>
534594
</Docs>
535595
</Member>
536596
</Members>
537-
</Type>
597+
</Type>

0 commit comments

Comments
 (0)