Skip to content

Commit dafb6d9

Browse files
Adds docs for Microsoft.Extensions.Primitives (#4105)
* Adds docs for Microsoft.Extensions.Primitives * PR feedback * Add missing values * Add for missing params and typeparams * Apply suggestions from code review correct value sentences for boolean types * one liner change * Update xml/Microsoft.Extensions.Primitives/CancellationChangeToken.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> * Update xml/Microsoft.Extensions.Primitives/CompositeChangeToken.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> * Update xml/Microsoft.Extensions.Primitives/ChangeToken.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> * Update xml/Microsoft.Extensions.Primitives/CompositeChangeToken.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> * Update xml/Microsoft.Extensions.Primitives/StringSegmentComparer.xml Co-Authored-By: Carlos Sanchez Lopez <[email protected]> Co-authored-by: Carlos Sanchez Lopez <[email protected]>
1 parent 217a5fb commit dafb6d9

10 files changed

+326
-220
lines changed

xml/Microsoft.Extensions.Primitives/CancellationChangeToken.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="CancellationChangeToken" FullName="Microsoft.Extensions.Primitives.CancellationChangeToken">
1+
<Type Name="CancellationChangeToken" FullName="Microsoft.Extensions.Primitives.CancellationChangeToken">
22
<TypeSignature Language="C#" Value="public class CancellationChangeToken : Microsoft.Extensions.Primitives.IChangeToken" />
33
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CancellationChangeToken extends System.Object implements class Microsoft.Extensions.Primitives.IChangeToken" />
44
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Primitives.CancellationChangeToken" />
@@ -83,8 +83,8 @@
8383
<ReturnType>System.Boolean</ReturnType>
8484
</ReturnValue>
8585
<Docs>
86-
<summary>To be added.</summary>
87-
<value>To be added.</value>
86+
<summary>Indicates if this token will pro-actively raise callbacks. If <see langword="false" />, the token consumer must poll <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> to detect changes.</summary>
87+
<value><see langword="true" /> if the token will proactively raise callbacks; <see langword="false" /> otherwise.</value>
8888
<remarks>To be added.</remarks>
8989
<inheritdoc />
9090
</Docs>
@@ -115,8 +115,8 @@
115115
<ReturnType>System.Boolean</ReturnType>
116116
</ReturnValue>
117117
<Docs>
118-
<summary>To be added.</summary>
119-
<value>To be added.</value>
118+
<summary>Gets a value that indicates if a change has occurred.</summary>
119+
<value><see langword="true" /> if a change has occured; <see langword="false" /> otherwise.</value>
120120
<remarks>To be added.</remarks>
121121
<inheritdoc />
122122
</Docs>
@@ -151,10 +151,10 @@
151151
<Parameter Name="state" Type="System.Object" />
152152
</Parameters>
153153
<Docs>
154-
<param name="callback">To be added.</param>
155-
<param name="state">To be added.</param>
156-
<summary>To be added.</summary>
157-
<returns>To be added.</returns>
154+
<param name="callback">The <see cref="T:System.Action`1" /> to invoke.</param>
155+
<param name="state">State to be passed into the callback.</param>
156+
<summary>Registers for a callback that will be invoked when the entry has changed. <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> must be set before the callback is invoked.</summary>
157+
<returns>An <see cref="T:System.IDisposable" /> that is used to unregister the callback.</returns>
158158
<remarks>To be added.</remarks>
159159
<inheritdoc />
160160
</Docs>

xml/Microsoft.Extensions.Primitives/ChangeToken.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<Parameter Name="state" Type="TState" />
9191
</Parameters>
9292
<Docs>
93-
<typeparam name="TState">To be added.</typeparam>
93+
<typeparam name="TState">The type of the state for the <paramref name="changeTokenConsumer" /> action.</typeparam>
9494
<param name="changeTokenProducer">Produces the change token.</param>
9595
<param name="changeTokenConsumer">Action called when the token changes.</param>
9696
<param name="state">state for the consumer.</param>

xml/Microsoft.Extensions.Primitives/CompositeChangeToken.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="CompositeChangeToken" FullName="Microsoft.Extensions.Primitives.CompositeChangeToken">
1+
<Type Name="CompositeChangeToken" FullName="Microsoft.Extensions.Primitives.CompositeChangeToken">
22
<TypeSignature Language="C#" Value="public class CompositeChangeToken : Microsoft.Extensions.Primitives.IChangeToken" />
33
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CompositeChangeToken extends System.Object implements class Microsoft.Extensions.Primitives.IChangeToken" />
44
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Primitives.CompositeChangeToken" />
@@ -77,8 +77,8 @@
7777
<ReturnType>System.Boolean</ReturnType>
7878
</ReturnValue>
7979
<Docs>
80-
<summary>To be added.</summary>
81-
<value>To be added.</value>
80+
<summary>Indicates if this token will pro-actively raise callbacks. If <see langword="false" />, the token consumer must poll <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> to detect changes.</summary>
81+
<value><see langword="true" /> if the token will proactively raise callbacks; <see langword="false" /> otherwise.</value>
8282
<remarks>To be added.</remarks>
8383
<inheritdoc />
8484
</Docs>
@@ -105,7 +105,7 @@
105105
</ReturnValue>
106106
<Docs>
107107
<summary>Returns the list of <see cref="T:Microsoft.Extensions.Primitives.IChangeToken" /> which compose the current <see cref="T:Microsoft.Extensions.Primitives.CompositeChangeToken" />.</summary>
108-
<value>To be added.</value>
108+
<value>The list of <see cref="T:Microsoft.Extensions.Primitives.IChangeToken" /> instances which compose the current <see cref="T:Microsoft.Extensions.Primitives.CompositeChangeToken" />.</value>
109109
<remarks>To be added.</remarks>
110110
</Docs>
111111
</Member>
@@ -133,8 +133,8 @@
133133
<ReturnType>System.Boolean</ReturnType>
134134
</ReturnValue>
135135
<Docs>
136-
<summary>To be added.</summary>
137-
<value>To be added.</value>
136+
<summary>Gets a value that indicates if a change has occurred.</summary>
137+
<value><see langword="true" /> if a change has occured; <see langword="false" /> otherwise.</value>
138138
<remarks>To be added.</remarks>
139139
<inheritdoc />
140140
</Docs>
@@ -167,10 +167,10 @@
167167
<Parameter Name="state" Type="System.Object" />
168168
</Parameters>
169169
<Docs>
170-
<param name="callback">To be added.</param>
171-
<param name="state">To be added.</param>
172-
<summary>To be added.</summary>
173-
<returns>To be added.</returns>
170+
<param name="callback">The <see cref="T:System.Action`1" /> to invoke.</param>
171+
<param name="state">State to be passed into the callback.</param>
172+
<summary>Registers for a callback that will be invoked when the entry has changed. <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> must be set before the callback is invoked.</summary>
173+
<returns>An <see cref="T:System.IDisposable" /> that is used to unregister the callback.</returns>
174174
<remarks>To be added.</remarks>
175175
<inheritdoc />
176176
</Docs>

xml/Microsoft.Extensions.Primitives/IChangeToken.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<Docs>
4848
<summary>Indicates if this token will pro-actively raise callbacks. If <see langword="false" />, the token consumer must
4949
poll <see cref="P:Microsoft.Extensions.Primitives.IChangeToken.HasChanged" /> to detect changes.</summary>
50-
<value>To be added.</value>
50+
<value><see langword="true" /> if the token will proactively raise callbacks; <see langword="false" /> otherwise.</value>
5151
<remarks>To be added.</remarks>
5252
</Docs>
5353
</Member>
@@ -75,7 +75,7 @@
7575
</ReturnValue>
7676
<Docs>
7777
<summary>Gets a value that indicates if a change has occurred.</summary>
78-
<value>To be added.</value>
78+
<value><see langword="true" /> if a change has occurred; <see langword="false" /> otherwise.</value>
7979
<remarks>To be added.</remarks>
8080
</Docs>
8181
</Member>

xml/Microsoft.Extensions.Primitives/StringSegment.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="StringSegment" FullName="Microsoft.Extensions.Primitives.StringSegment">
1+
<Type Name="StringSegment" FullName="Microsoft.Extensions.Primitives.StringSegment">
22
<TypeSignature Language="C#" Value="public struct StringSegment : IEquatable&lt;Microsoft.Extensions.Primitives.StringSegment&gt;, IEquatable&lt;string&gt;" />
33
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit StringSegment extends System.ValueType implements class System.IEquatable`1&lt;string&gt;, class System.IEquatable`1&lt;valuetype Microsoft.Extensions.Primitives.StringSegment&gt;" />
44
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Primitives.StringSegment" />
@@ -182,9 +182,11 @@
182182
</ReturnValue>
183183
<Docs>
184184
<summary>Gets the <see cref="T:System.String" /> buffer for this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</summary>
185-
<value>To be added.</value>
185+
<value>The <see cref="T:System.String" /> buffer for this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</value>
186186
<remarks>To be added.</remarks>
187187
</Docs>
188+
<summary>Gets the value of this segment as a <see cref="T:System.String" />.</summary>
189+
<value>The value of this segment as a <see cref="T:System.String" />.</value>
188190
</Member>
189191
<Member MemberName="Compare">
190192
<MemberSignature Language="C#" Value="public static int Compare (Microsoft.Extensions.Primitives.StringSegment a, Microsoft.Extensions.Primitives.StringSegment b, StringComparison comparisonType);" />
@@ -556,7 +558,7 @@
556558
</ReturnValue>
557559
<Docs>
558560
<summary>Gets whether this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> contains a valid value.</summary>
559-
<value>To be added.</value>
561+
<value><see langword="true" /> if the <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> contains a valid value; <see langword="false" /> otherwise.</value>
560562
<remarks>To be added.</remarks>
561563
</Docs>
562564
</Member>
@@ -901,7 +903,7 @@
901903
</ReturnValue>
902904
<Docs>
903905
<summary>Gets the length of this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</summary>
904-
<value>To be added.</value>
906+
<value>The length of this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</value>
905907
<remarks>To be added.</remarks>
906908
</Docs>
907909
</Member>
@@ -929,7 +931,7 @@
929931
</ReturnValue>
930932
<Docs>
931933
<summary>Gets the offset within the buffer for this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</summary>
932-
<value>To be added.</value>
934+
<value>The offset within the buffer for this <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</value>
933935
<remarks>To be added.</remarks>
934936
</Docs>
935937
</Member>
@@ -991,8 +993,8 @@
991993
<Parameter Name="segment" Type="Microsoft.Extensions.Primitives.StringSegment" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0" />
992994
</Parameters>
993995
<Docs>
994-
<param name="segment">To be added.</param>
995-
<summary>To be added.</summary>
996+
<param name="segment">The <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to convert to a <see cref="T:System.ReadOnlyMemory`1" />.</param>
997+
<summary>Creates a see <see cref="T:System.ReadOnlyMemory`1" /> from the given <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</summary>
996998
<returns>To be added.</returns>
997999
<remarks>To be added.</remarks>
9981000
</Docs>
@@ -1020,8 +1022,8 @@
10201022
<Parameter Name="segment" Type="Microsoft.Extensions.Primitives.StringSegment" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0" />
10211023
</Parameters>
10221024
<Docs>
1023-
<param name="segment">To be added.</param>
1024-
<summary>To be added.</summary>
1025+
<param name="segment">The <see cref="T:Microsoft.Extensions.Primitives.StringSegment" /> to convert to a <see cref="T:System.ReadOnlySpan`1" />.</param>
1026+
<summary>Creates a see <see cref="T:System.ReadOnlySpan`1" /> from the given <see cref="T:Microsoft.Extensions.Primitives.StringSegment" />.</summary>
10251027
<returns>To be added.</returns>
10261028
<remarks>To be added.</remarks>
10271029
</Docs>
@@ -1450,7 +1452,7 @@
14501452
</ReturnValue>
14511453
<Docs>
14521454
<summary>Gets the value of this segment as a <see cref="T:System.String" />.</summary>
1453-
<value>To be added.</value>
1455+
<value>The value of this segment as a <see cref="T:System.String" />.</value>
14541456
<remarks>To be added.</remarks>
14551457
</Docs>
14561458
</Member>

xml/Microsoft.Extensions.Primitives/StringSegmentComparer.xml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="StringSegmentComparer" FullName="Microsoft.Extensions.Primitives.StringSegmentComparer">
1+
<Type Name="StringSegmentComparer" FullName="Microsoft.Extensions.Primitives.StringSegmentComparer">
22
<TypeSignature Language="C#" Value="public class StringSegmentComparer : System.Collections.Generic.IEqualityComparer&lt;Microsoft.Extensions.Primitives.StringSegment&gt;" FrameworkAlternate="dotnet-plat-ext-2.0;dotnet-plat-ext-2.1" />
33
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit StringSegmentComparer extends System.Object implements class System.Collections.Generic.IEqualityComparer`1&lt;valuetype Microsoft.Extensions.Primitives.StringSegment&gt;" FrameworkAlternate="dotnet-plat-ext-2.0;dotnet-plat-ext-2.1" />
44
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Primitives.StringSegmentComparer" />
@@ -61,11 +61,25 @@
6161
<Parameter Name="y" Type="Microsoft.Extensions.Primitives.StringSegment" Index="1" FrameworkAlternate="dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;dotnet-plat-ext-3.1;dotnet-plat-ext-5.0" />
6262
</Parameters>
6363
<Docs>
64-
<param name="x">To be added.</param>
65-
<param name="y">To be added.</param>
66-
<summary>To be added.</summary>
67-
<returns>To be added.</returns>
68-
<remarks>To be added.</remarks>
64+
<param name="x">The first object to compare.</param>
65+
<param name="y">The second object to compare.</param>
66+
<summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
67+
<returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />.</returns>
68+
<remarks>
69+
<format type="text/markdown"><![CDATA[
70+
71+
## Remarks
72+
73+
The value returned by this method can have the following meanings:
74+
75+
| Value | Meaning |
76+
|-------------------|--------------------------|
77+
| Less than zero | `x` is less than `y`. |
78+
| Zero | `x` equals `y`. |
79+
| Greater than zero | `x` is greater than `y`. |
80+
81+
]]></format>
82+
</remarks>
6983
</Docs>
7084
</Member>
7185
<Member MemberName="Equals">
@@ -96,10 +110,11 @@
96110
<Parameter Name="y" Type="Microsoft.Extensions.Primitives.StringSegment" />
97111
</Parameters>
98112
<Docs>
99-
<param name="x">To be added.</param>
100-
<param name="y">To be added.</param>
101-
<summary>To be added.</summary>
102-
<returns>To be added.</returns>
113+
<param name="x">The first object of type <paramref name="T" /> to compare.</param>
114+
<param name="y">The second object of type <paramref name="T" /> to compare.</param>
115+
<summary>Determines whether the specified objects are equal.</summary>
116+
<returns>
117+
<see langword="true" /> if the specified objects are equal; otherwise, <see langword="false" />.</returns>
103118
<remarks>To be added.</remarks>
104119
</Docs>
105120
</Member>
@@ -130,9 +145,9 @@
130145
<Parameter Name="obj" Type="Microsoft.Extensions.Primitives.StringSegment" />
131146
</Parameters>
132147
<Docs>
133-
<param name="obj">To be added.</param>
134-
<summary>To be added.</summary>
135-
<returns>To be added.</returns>
148+
<param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned.</param>
149+
<summary>Returns a hash code for the specified object.</summary>
150+
<returns>A hash code for the specified object.</returns>
136151
<remarks>To be added.</remarks>
137152
</Docs>
138153
</Member>

xml/Microsoft.Extensions.Primitives/StringTokenizer+Enumerator.xml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="StringTokenizer+Enumerator" FullName="Microsoft.Extensions.Primitives.StringTokenizer+Enumerator">
1+
<Type Name="StringTokenizer+Enumerator" FullName="Microsoft.Extensions.Primitives.StringTokenizer+Enumerator">
22
<TypeSignature Language="C#" Value="public struct StringTokenizer.Enumerator : System.Collections.Generic.IEnumerator&lt;Microsoft.Extensions.Primitives.StringSegment&gt;" />
33
<TypeSignature Language="ILAsm" Value=".class nested public sequential ansi sealed beforefieldinit StringTokenizer/Enumerator extends System.ValueType implements class System.Collections.Generic.IEnumerator`1&lt;valuetype Microsoft.Extensions.Primitives.StringSegment&gt;, class System.Collections.IEnumerator, class System.IDisposable" />
44
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Primitives.StringTokenizer.Enumerator" />
@@ -94,8 +94,8 @@
9494
<ReturnType>Microsoft.Extensions.Primitives.StringSegment</ReturnType>
9595
</ReturnValue>
9696
<Docs>
97-
<summary>To be added.</summary>
98-
<value>To be added.</value>
97+
<summary>Gets the element in the collection at the current position of the enumerator.</summary>
98+
<value>The element in the collection at the current position of the enumerator.</value>
9999
<remarks>To be added.</remarks>
100100
</Docs>
101101
</Member>
@@ -126,7 +126,7 @@
126126
</ReturnValue>
127127
<Parameters />
128128
<Docs>
129-
<summary>To be added.</summary>
129+
<summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
130130
<remarks>To be added.</remarks>
131131
</Docs>
132132
</Member>
@@ -157,8 +157,9 @@
157157
</ReturnValue>
158158
<Parameters />
159159
<Docs>
160-
<summary>To be added.</summary>
161-
<returns>To be added.</returns>
160+
<summary>Advances the enumerator to the next element of the collection.</summary>
161+
<returns>
162+
<see langword="true" /> if the enumerator was successfully advanced to the next element; <see langword="false" /> if the enumerator has passed the end of the collection.</returns>
162163
<remarks>To be added.</remarks>
163164
</Docs>
164165
</Member>
@@ -189,7 +190,7 @@
189190
</ReturnValue>
190191
<Parameters />
191192
<Docs>
192-
<summary>To be added.</summary>
193+
<summary>Sets the enumerator to its initial position, which is before the first element in the collection.</summary>
193194
<remarks>To be added.</remarks>
194195
</Docs>
195196
</Member>
@@ -219,9 +220,17 @@
219220
<ReturnType>System.Object</ReturnType>
220221
</ReturnValue>
221222
<Docs>
222-
<summary>To be added.</summary>
223-
<value>To be added.</value>
224-
<remarks>To be added.</remarks>
223+
<summary>Gets the element in the collection at the current position of the enumerator.</summary>
224+
<value>The element in the collection at the current position of the enumerator.</value>
225+
<remarks>
226+
<format type="text/markdown"><![CDATA[
227+
228+
## Remarks
229+
230+
This member is an explicit interface member implementation. It can be used only when the <xref:Microsoft.Extensions.Primitives.StringTokenizer.Enumerator> instance is cast to an <xref:System.Collections.IEnumerator> interface.
231+
232+
]]></format>
233+
</remarks>
225234
</Docs>
226235
</Member>
227236
</Members>

0 commit comments

Comments
 (0)