You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<summary>Provides an awaitable result of an asynchronous operation.</summary>
37
+
<remarks>
38
+
<formattype="text/markdown"><.
52
+
53
+
Using a `ValueTask` instead of a <xref:System.Threading.Tasks.Task> introduces some overhead. Because `ValueTask` is a structure with multiple fields, returning it from the method results in copying more data compared to returning a single <xref:System.Threading.Tasks.Task> reference. As such, the default choice for any asynchronous method that does not return a result should be to return a <xref:System.Threading.Tasks.Task>. Only if performance analysis proves it worthwhile should a `ValueTask` be used instead of a <xref:System.Threading.Tasks.Task>. The <xref:System.Threading.Tasks.Task.CompletedTask?displayProperty=nameWithType> property should be used to hand back a successfully completed singleton in the case where a method returning a <xref:System.Threading.Tasks.Task> completes synchronously and successfully.
54
+
55
+
> [!NOTE]
56
+
> The use of the `ValueTask` type is supported starting with C# 7.0 and is not supported by any version of Visual Basic.
<paramname="task">The task that represents the operation.</param>
84
+
<summary>Initializes a new instance of the <seecref="T:System.Threading.Tasks.ValueTask" /> class using the supplied task that represents the operation.</summary>
64
85
<remarks>To be added.</remarks>
65
86
</Docs>
66
87
</Member>
@@ -88,9 +109,9 @@
88
109
<ParameterName="token"Type="System.Int16" />
89
110
</Parameters>
90
111
<Docs>
91
-
<paramname="source">To be added.</param>
92
-
<paramname="token">To be added.</param>
93
-
<summary>To be added.</summary>
112
+
<paramname="source">An object that represents the operation.</param>
113
+
<paramname="token">An opaque value that is passed through to the <seecref="T:System.Threading.Tasks.Sources.IValueTaskSource"/></param>
114
+
<summary>Initializes a new instance of the <seecref="T:System.Threading.Tasks.ValueTask" /> class using the supplied <seecref="T:System.Threading.Tasks.Sources.IValueTaskSource" /> object that represents the operation.</summary>
94
115
<remarks>To be added.</remarks>
95
116
</Docs>
96
117
</Member>
@@ -118,8 +139,8 @@
118
139
</ReturnValue>
119
140
<Parameters />
120
141
<Docs>
121
-
<summary>To be added.</summary>
122
-
<returns>To be added.</returns>
142
+
<summary>Retrieves a <seecref="T:System.Threading.Tasks.Task" /> object that represents this <seecref="T:System.Threading.Tasks.ValueTask" />.</summary>
143
+
<returns>The <seecref="T:System.Threading.Tasks.Task" /> object that is wrapped in this <seecref="T:System.Threading.Tasks.ValueTask" /> if one exists, or a new <seecref="T:System.Threading.Tasks.Task" /> object that represents the result.</returns>
<paramname="continueOnCapturedContext">To be added.</param>
153
-
<summary>To be added.</summary>
154
-
<returns>To be added.</returns>
173
+
<paramname="continueOnCapturedContext">
174
+
<seelangword="true" /> to attempt to marshal the continuation back to the captured context; otherwise, <seelangword="false" />.</param>
175
+
<summary>Configures an awaiter for this value.</summary>
176
+
<returns>The configured awaiter.</returns>
155
177
<remarks>To be added.</remarks>
156
178
</Docs>
157
179
</Member>
@@ -181,10 +203,18 @@
181
203
<ParameterName="obj"Type="System.Object" />
182
204
</Parameters>
183
205
<Docs>
184
-
<paramname="obj">To be added.</param>
185
-
<summary>To be added.</summary>
186
-
<returns>To be added.</returns>
187
-
<remarks>To be added.</remarks>
206
+
<paramname="obj">The object to compare with the current object.</param>
207
+
<summary>Determines whether the specified object is equal to the current <seecref="T:System.Threading.Tasks.ValueTask" /> instance.</summary>
208
+
<returns>
209
+
<seelangword="true" /> if the specified object is equal to the current object; otherwise, <seelangword="false" />.</returns>
210
+
<remarks>
211
+
<formattype="text/markdown"><![CDATA[
212
+
213
+
## Remarks
214
+
Two <xref:System.Threading.Tasks.ValueTask> instances are equal when they wrap the same <xref:System.Threading.Tasks.Task> or the same pair of the <xref:System.Threading.Tasks.Sources.IValueTaskSource> object and the token.
<paramname="other">The object to compare with the current object.</param>
250
+
<summary>Determines whether the specified <seecref="T:System.Threading.Tasks.ValueTask" /> object is equal to the current <seecref="T:System.Threading.Tasks.ValueTask" /> object.</summary>
251
+
<returns>
252
+
<seelangword="true" /> if the specified object is equal to the current object; otherwise, <seelangword="false" />.</returns>
253
+
<remarks>
254
+
<formattype="text/markdown"><![CDATA[
255
+
256
+
## Remarks
257
+
Two <xref:System.Threading.Tasks.ValueTask> instances are equal when they wrap the same <xref:System.Threading.Tasks.Task> or the same pair of the <xref:System.Threading.Tasks.Sources.IValueTaskSource> object and the token.
258
+
259
+
]]></format>
260
+
</remarks>
223
261
</Docs>
224
262
</Member>
225
263
<MemberMemberName="GetAwaiter">
@@ -246,8 +284,8 @@
246
284
</ReturnValue>
247
285
<Parameters />
248
286
<Docs>
249
-
<summary>To be added.</summary>
250
-
<returns>To be added.</returns>
287
+
<summary>Creates an awaiter for this value.</summary>
288
+
<returns>The awaiter.</returns>
251
289
<remarks>To be added.</remarks>
252
290
</Docs>
253
291
</Member>
@@ -275,8 +313,8 @@
275
313
</ReturnValue>
276
314
<Parameters />
277
315
<Docs>
278
-
<summary>To be added.</summary>
279
-
<returns>To be added.</returns>
316
+
<summary>Returns the hash code for this instance.</summary>
317
+
<returns>The hash code for the current object.</returns>
280
318
<remarks>To be added.</remarks>
281
319
</Docs>
282
320
</Member>
@@ -303,8 +341,9 @@
303
341
<ReturnType>System.Boolean</ReturnType>
304
342
</ReturnValue>
305
343
<Docs>
306
-
<summary>To be added.</summary>
307
-
<value>To be added.</value>
344
+
<summary>Gets a value that indicates whether this object represents a canceled operation.</summary>
345
+
<value>
346
+
<seelangword="true" /> if this object represents a canceled operation; otherwise, <seelangword="false" />.</value>
308
347
<remarks>To be added.</remarks>
309
348
</Docs>
310
349
</Member>
@@ -331,8 +370,9 @@
331
370
<ReturnType>System.Boolean</ReturnType>
332
371
</ReturnValue>
333
372
<Docs>
334
-
<summary>To be added.</summary>
335
-
<value>To be added.</value>
373
+
<summary>Gets a value that indicates whether this object represents a completed operation.</summary>
374
+
<value>
375
+
<seelangword="true" /> if this object represents a completed operation; otherwise, <seelangword="false" />.</value>
336
376
<remarks>To be added.</remarks>
337
377
</Docs>
338
378
</Member>
@@ -359,8 +399,9 @@
359
399
<ReturnType>System.Boolean</ReturnType>
360
400
</ReturnValue>
361
401
<Docs>
362
-
<summary>To be added.</summary>
363
-
<value>To be added.</value>
402
+
<summary>Gets a value that indicates whether this object represents a successfully completed operation.</summary>
403
+
<value>
404
+
<seelangword="true" /> if this object represents a successfully completed operation; otherwise, <seelangword="false" />.</value>
364
405
<remarks>To be added.</remarks>
365
406
</Docs>
366
407
</Member>
@@ -387,8 +428,9 @@
387
428
<ReturnType>System.Boolean</ReturnType>
388
429
</ReturnValue>
389
430
<Docs>
390
-
<summary>To be added.</summary>
391
-
<value>To be added.</value>
431
+
<summary>Gets a value that indicates whether this object represents a failed operation.</summary>
432
+
<value>
433
+
<seelangword="true" /> if this object represents a failed operation; otherwise, <seelangword="false" />.</value>
<paramname="left">The first value to compare.</param>
465
+
<paramname="right">The second value to compare.</param>
466
+
<summary>Compares two <seecref="T:System.Threading.Tasks.ValueTask" /> values for equality.</summary>
467
+
<returns>
468
+
<seelangword="true" /> if the two <seecref="T:System.Threading.Tasks.ValueTask" /> values are equal; otherwise, <seelangword="false" />.</returns>
469
+
<remarks>
470
+
<formattype="text/markdown"><![CDATA[
471
+
472
+
## Remarks
473
+
Two <xref:System.Threading.Tasks.ValueTask> instances are equal when they wrap the same <xref:System.Threading.Tasks.Task> or the same pair of the <xref:System.Threading.Tasks.Sources.IValueTaskSource> object and the token.
<paramname="left">The first value to compare.</param>
507
+
<paramname="right">The second value to compare.</param>
508
+
<summary>Determines whether two <seecref="T:System.Threading.Tasks.ValueTask" /> values are unequal.</summary>
509
+
<returns>
510
+
<seelangword="true" /> if the two <seecref="T:System.Threading.Tasks.ValueTask" /> values are not equal; otherwise, <seelangword="false" />.</returns>
511
+
<remarks>
512
+
<formattype="text/markdown"><![CDATA[
513
+
514
+
## Remarks
515
+
Two <xref:System.Threading.Tasks.ValueTask> instances are equal when they wrap the same <xref:System.Threading.Tasks.Task> or the same pair of the <xref:System.Threading.Tasks.Sources.IValueTaskSource> object and the token.
516
+
517
+
]]></format>
518
+
</remarks>
461
519
</Docs>
462
520
</Member>
463
521
<MemberMemberName="Preserve">
@@ -484,10 +542,10 @@
484
542
</ReturnValue>
485
543
<Parameters />
486
544
<Docs>
487
-
<summary>To be added.</summary>
488
-
<returns>To be added.</returns>
545
+
<summary>Gets a <seecref="T:System.Threading.Tasks.ValueTask"/> that may be used at any point in the future.</summary>
0 commit comments