SetStateMachine Method

AsyncTaskMethodBuilder.SetStateMachine Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Associates the builder with the specified state machine.

Namespace:  System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Sub SetStateMachine ( _
	stateMachine As IAsyncStateMachine _
)

Parameters

stateMachine
Type: System.Runtime.CompilerServices.IAsyncStateMachine
The state machine instance to associate with the builder.

ExceptionCondition
ArgumentNullException

stateMachine is Nothing.

InvalidOperationException

The state machine was previously set.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft