libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/GetConversationMembers.cs
/// <summary>
/// Called when the dialog is started and pushed onto the dialog stack.
/// </summary>
/// <param name="dc">The <see cref="DialogContext"/> for the current turn of conversation.</param>
/// <param name="options">Optional, initial information to pass to the dialog.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Called when the dialog is started and pushed onto the dialog stack.
Called when the dialog is started and pushed onto the dialog stack .
public override async Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (options is CancellationToken)
            {
                throw new ArgumentException($"{nameof(options)} cannot be a cancellation token");
            }
            if (this.Disabled != null && this.Disabled.GetValue(dc.State) == true)
            {
                return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false);
            }
            var bfAdapter = dc.Context.Adapter as BotFrameworkAdapter;
            if (bfAdapter == null)
            {
                throw new InvalidOperationException("GetActivityMembers() only works with BotFrameworkAdapter");
            }
            var result = await bfAdapter.GetConversationMembersAsync(dc.Context, cancellationToken).ConfigureAwait(false);
            if (this.Property != null)
            {
                dc.State.SetValue(this.Property.GetValue(dc.State), result);
            }
            return await dc.EndDialogAsync(result, cancellationToken: cancellationToken).ConfigureAwait(false);
        }
public override async Task < DialogTurnResult > BeginDialogAsync ( DialogContext dc , object options = null , CancellationToken cancellationToken = default ( CancellationToken ) ) { if ( options is CancellationToken ) { throw new ArgumentException ( $" { nameof ( options ) }  cannot be a cancellation token " ) ; } if ( this . Disabled != null && this . Disabled . GetValue ( dc . State ) == true ) { return await dc . EndDialogAsync ( cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ; } var bfAdapter = dc . Context . Adapter as BotFrameworkAdapter ; if ( bfAdapter == null ) { throw new InvalidOperationException ( " " ) ; } var result = await bfAdapter . GetConversationMembersAsync ( dc . Context , cancellationToken ) . ConfigureAwait ( false ) ; if ( this . Property != null ) { dc . State . SetValue ( this . Property . GetValue ( dc . State ) , result ) ; } return await dc . EndDialogAsync ( result , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ; }
Called when the dialog is started and pushed onto the dialog stack.
Called when the dialog is started and pushed onto the dialog stack .
A  representing the asynchronous operation.
A representing the asynchronous operation .
dc
DialogContext
The  for the current turn of conversation.
The for the current turn of conversation .
options
object
Optional, initial information to pass to the dialog.
Optional initial information to pass to the dialog .
cancellationToken
CancellationToken
A cancellation token that can be used by other objects
or threads to receive notice of cancellation.
A cancellation token that can be used by other objects or threads to receive notice of cancellation .