Click or drag to resize
AsyncTaskMethodBuilderTResult Structure
This API is preliminary and subject to change.
Provides a builder for asynchronous methods that return TaskTResult. This type is intended for compiler use only.

Namespace: System.Runtime.CompilerServices
Assembly: Rackspace.Threading (in Rackspace.Threading.dll) Version: 2.1.0-beta1
Syntax
public struct AsyncTaskMethodBuilder<TResult> : IAsyncMethodBuilder

Type Parameters

TResult
The return type of the asynchronous method.

The AsyncTaskMethodBuilderTResult type exposes the following members.

Methods
  NameDescription
Public methodAwaitOnCompletedTAwaiter, TStateMachine
Schedules the specified state machine to be pushed forward when the specified awaiter completes.
Public methodAwaitUnsafeOnCompletedTAwaiter, TStateMachine
Schedules the specified state machine to be pushed forward when the specified awaiter completes.
Public methodStatic memberCreate
Initializes a new AsyncTaskMethodBuilder.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetException
Public methodSetResult
Public methodSetStateMachine
Associates the builder with the state machine it represents.
Public methodStartTStateMachine
Initiates the builder's execution with the associated state machine.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
Properties
Remarks
AsyncTaskMethodBuilderTResult is a value type, and thus it is copied by value. Prior to being copied, one of its Task, SetResult(TResult), or SetException(Exception) members must be accessed, or else the copies may end up building distinct Task instances.
Version Information

.NET Framework

Supported in: 3.5

Threading Library

Supported in: 2.1
See Also