示例#1
0
 /// <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_builder.SetStateMachine(stateMachine);
 }
示例#2
0
 /// <summary>Associates the builder with the specified state machine.</summary>
 /// <param name="stateMachine">The state machine instance to associate with the builder.</param>
 public void SetStateMachine(IAsyncStateMachine stateMachine)
 {
     _methodBuilder.SetStateMachine(stateMachine);
 }
 /// <summary>Associates the builder with the state machine it represents.</summary>
 /// <param name="stateMachine">The heap-allocated state machine object.</param>
 /// <exception cref="ArgumentNullException">
 /// If <paramref name="stateMachine"/> is <see langword="null"/>.
 /// </exception>
 /// <exception cref="InvalidOperationException">The builder is incorrectly initialized.</exception>
 public void SetStateMachine(IAsyncStateMachine stateMachine)
 {
     // argument validation handled by AsyncMethodBuilderCore
     _builder.SetStateMachine(stateMachine);
 }