System.Threading.Tasks Holds state related to the builder's IAsyncStateMachine. This is a mutable struct. Be very delicate with it. A reference to the heap-allocated state machine object associated with this builder. Initiates the builder's execution with the associated state machine. Specifies the type of the state machine. The state machine instance, passed by reference. The argument is null (Nothing in Visual Basic). Associates the builder with the state machine it represents. The heap-allocated state machine object. The argument was null (Nothing in Visual Basic). The builder is incorrectly initialized. Gets the Action to use with an awaiter's OnCompleted or UnsafeOnCompleted method. On first invocation, the supplied state machine will be boxed. Specifies the type of the method builder used. Specifies the type of the state machine used. The builder. The state machine. An Action to provide to the awaiter. Provides the ability to invoke a state machine's MoveNext method under a supplied ExecutionContext. The context with which to run MoveNext. The state machine whose MoveNext method should be invoked. Initializes the runner. The context with which to run MoveNext. Invokes MoveNext under the provided context. Cached delegate used with ExecutionContext.Run. Invokes the MoveNext method on the supplied IAsyncStateMachine. The IAsyncStateMachine machine instance. Provides a base class used to cache tasks of a specific return type. Specifies the type of results the cached tasks return. A singleton cache for this result type. This may be null if there are no cached tasks for this TResult. Creates a non-disposable task. The result for the task. The cacheable task. Creates a cache. A task cache for this result type. Gets a cached task if one exists. The result for which we want a cached task. A cached task if one exists; otherwise, null. Provides a cache for Boolean tasks. A true task. A false task. Gets a cached task for the Boolean result. true or false A cached task for the Boolean result. Provides a cache for zero Int32 tasks. The minimum value, inclusive, for which we want a cached task. The maximum value, exclusive, for which we want a cached task. The cache of Task{Int32}. Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX). Gets a cached task for the zero Int32 result. The integer value A cached task for the Int32 result or null if not cached. Throws the exception on the ThreadPool. The exception to propagate. The target context on which to propagate the exception. Null to use the ThreadPool. Copies the exception's stack trace so its stack trace isn't overwritten. The exception to prepare. Provides a builder for asynchronous methods that return . This type is intended for compiler use only. AsyncTaskMethodBuilder is a value type, and thus it is copied by value. Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, or else the copies may end up building distinct Task instances. Represents an asynchronous method builder. A cached VoidTaskResult task used for builders that complete synchronously. The generic builder object to which this non-generic instance delegates. Initializes a new . The initialized . Initiates the builder's execution with the associated state machine. Specifies the type of the state machine. The state machine instance, passed by reference. Associates the builder with the state machine it represents. The heap-allocated state machine object. The argument was null (Nothing in Visual Basic). The builder is incorrectly initialized. Perform any initialization necessary prior to lifting the builder to the heap. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Completes the in the RanToCompletion state. The builder is not initialized. The task has already completed. Completes the in the Faulted state with the specified exception. The to use to fault the task. The argument is null (Nothing in Visual Basic). The builder is not initialized. The task has already completed. Called by the debugger to request notification when the first wait operation (await, Wait, Result, etc.) on this builder's task completes. true to enable notification; false to disable a previously set notification. Gets the for this builder. The representing the builder's asynchronous operation. The builder is not initialized. Gets an object that may be used to uniquely identify this builder to the debugger. This property lazily instantiates the ID in a non-thread-safe manner. It must only be used by the debugger, and only in a single-threaded manner when no other threads are in the middle of accessing this property or this.Task. Provides a builder for asynchronous methods that return . This type is intended for compiler use only. AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value. Prior to being copied, one of its Task, SetResult, or SetException members must be accessed, or else the copies may end up building distinct Task instances. A cached task for default(TResult). State related to the IAsyncStateMachine. The lazily-initialized task. Must be named m_task for debugger step-over to work correctly. The lazily-initialized task completion source. Temporary support for disabling crashing if tasks go unobserved. Initializes a new . The initialized . Initiates the builder's execution with the associated state machine. Specifies the type of the state machine. The state machine instance, passed by reference. Associates the builder with the state machine it represents. The heap-allocated state machine object. The argument was null (Nothing in Visual Basic). The builder is incorrectly initialized. Perform any initialization necessary prior to lifting the builder to the heap. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Completes the in the RanToCompletion state with the specified result. The result to use to complete the task. The task has already completed. Completes the builder by using either the supplied completed task, or by completing the builder's previously accessed task using default(TResult). A task already completed with the value default(TResult). The task has already completed. Completes the in the Faulted state with the specified exception. The to use to fault the task. The argument is null (Nothing in Visual Basic). The task has already completed. Called by the debugger to request notification when the first wait operation (await, Wait, Result, etc.) on this builder's task completes. true to enable notification; false to disable a previously set notification. This should only be invoked from within an asynchronous method, and only by the debugger. Gets a task for the specified result. This will either be a cached or new task, never null. The result for which we need a task. The completed task containing the result. Gets the lazily-initialized TaskCompletionSource. Gets the for this builder. The representing the builder's asynchronous operation. Gets an object that may be used to uniquely identify this builder to the debugger. This property lazily instantiates the ID in a non-thread-safe manner. It must only be used by the debugger, and only in a single-threaded manner when no other threads are in the middle of accessing this property or this.Task. Provides a builder for asynchronous methods that return void. This type is intended for compiler use only. The synchronization context associated with this operation. State related to the IAsyncStateMachine. An object used by the debugger to uniquely identify this builder. Lazily initialized. Temporary support for disabling crashing if tasks go unobserved. Registers with UnobservedTaskException to suppress exception crashing. Non-zero if PreventUnobservedTaskExceptions has already been invoked. Initializes a new . The initialized . Initializes the . The synchronizationContext associated with this operation. This may be null. Initiates the builder's execution with the associated state machine. Specifies the type of the state machine. The state machine instance, passed by reference. The argument was null (Nothing in Visual Basic). Associates the builder with the state machine it represents. The heap-allocated state machine object. The argument was null (Nothing in Visual Basic). The builder is incorrectly initialized. Perform any initialization necessary prior to lifting the builder to the heap. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Schedules the specified state machine to be pushed forward when the specified awaiter completes. Specifies the type of the awaiter. Specifies the type of the state machine. The awaiter. The state machine. Completes the method builder successfully. Faults the method builder with an exception. The exception that is the cause of this fault. The argument is null (Nothing in Visual Basic). The builder is not initialized. Notifies the current synchronization context that the operation completed. Gets an object that may be used to uniquely identify this builder to the debugger. This property lazily instantiates the ID in a non-thread-safe manner. It must only be used by the debugger and only in a single-threaded manner. Represents state machines generated for asynchronous methods. This type is intended for compiler use only. Moves the state machine to its next state. Configures the state machine with a heap-allocated replica. The heap-allocated replica. Represents an awaiter used to schedule continuations when an await operation completes. Represents an operation that will schedule continuations when the operation completes. Schedules the continuation action to be invoked when the instance completes. The action to invoke when the operation completes. The argument is null (Nothing in Visual Basic). Schedules the continuation action to be invoked when the instance completes. The action to invoke when the operation completes. The argument is null (Nothing in Visual Basic). Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information. Used with Task(of void)