Click or drag to resize
AsyncTaskMethodBuilder Structure
This API is preliminary and subject to change.
Provides a builder for asynchronous methods that return Task. 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 : IAsyncMethodBuilder

The AsyncTaskMethodBuilder 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
Completes the Task in the Faulted state with the specified exception.
Public methodSetResult
Completes the Task in the RanToCompletion state.
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
  NameDescription
Public propertyTask
Gets the Task for this builder.
Top
Remarks
AsyncTaskMethodBuilder is a value type, and thus it is copied by value. Prior to being copied, one of its Task, SetResult, 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