Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Threading.​Tasks.​ValueTask`1
Assembly: System.Runtime
Provides a value type that wraps a <see cref="T:System.Threading.Tasks.Task`1" /> and a <typeparamref name="TResult" /> , only one of which is used.
Properties
public
bool
IsCanceled
Gets a value that indicates whether this object represents a canceled operation.
public
bool
IsCompleted
Gets a value that indicates whether this object represents a completed operation.
public
bool
IsCompletedSuccessfully
Gets a value that indicates whether this object represents a successfully completed operation.
public
bool
IsFaulted
Gets a value that indicates whether this object represents a failed operation.
public
TResult
Result
Gets the result.
Methods
public
Task`1
AsTask​() Returns The <see cref="T:System.Threading.Tasks.Task`1" /> object that is wrapped in this <see cref="T:System.Threading.Tasks.ValueTask`1" /> if one exists, or a new <see cref="T:System.Threading.Tasks.Task`1" /> object that represents the result.
Retrieves a <see cref="T:System.Threading.Tasks.Task`1" /> object that represents this <see cref="T:System.Threading.Tasks.ValueTask`1" /> .
ConfigureAwait​(bool continueOnCapturedContext)
continueOnCapturedContext
<see langword="true" /> to attempt to marshal the continuation back to the captured context; otherwise, <see langword="false" /> .
Returns The configured awaiter.
Configures an awaiter for this value.
public
bool
Equals​(object obj)
obj
The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
GetAwaiter​()
Returns The awaiter.
Creates an awaiter for this value.
public
int
GetHashCode​() Returns The hash code for the current object.
Returns the hash code for this instance.
Gets a <see cref="T:System.Threading.Tasks.ValueTask`1" /> that may be used at any point in the future.
public
string
ToString​() Returns A string that represents the current object.
Returns a string that represents the current object.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .