/// <summary>Associates the builder with the state machine it represents.</summary> /// <param name="stateMachine">The heap-allocated state machine object.</param> /// <exception cref="System.ArgumentNullException">The <paramref name="stateMachine"/> argument was null (Nothing in Visual Basic).</exception> /// <exception cref="System.InvalidOperationException">The builder is incorrectly initialized.</exception> public void SetStateMachine(IAsyncStateMachine stateMachine) { m_coreState.SetStateMachine(stateMachine); // argument validation handled by AsyncMethodBuilderCore }
/// <summary> /// Associates the builder with the specified state machine. /// </summary> /// <param name="stateMachine">The state machine instance to associate with the builder.</param> /// <exception cref="T:System.ArgumentNullException"><paramref name="stateMachine" /> is null.</exception> /// <exception cref="T:System.InvalidOperationException">The state machine was previously set.</exception> public void SetStateMachine(IAsyncStateMachine stateMachine) { m_coreState.SetStateMachine(stateMachine); }