public IEventActivatedDialog(string key, ConversationData oldConversationData, UserData oldUserProfile) : this(EventActivatedDialogsStateManager.GetRequestStatus(KeyAugmentationFunction(key))) { EventActivatedDialogsStateManager.AddRequestStatus( KeyAugmentationFunction(key), new DialogStateData(oldUserProfile, oldConversationData, null, null)); }
public override async Task StartAsync(ITurnContext turnContext, CancellationToken cancellationToken) { EventActivatedDialogsStateManager.AddRequestStatus( KeyAugmentationFunction(await this.KeySelectionFunction(turnContext, cancellationToken)), new DialogStateData( this.UserProfile, this.ConversationData, turnContext.Adapter, turnContext.Activity.GetConversationReference())); var msg = turnContext.Activity.CreateReply(); msg.Type = ActivityTypes.EndOfConversation; msg.AsEndOfConversationActivity().Code = EndOfConversationCodes.CompletedSuccessfully; await turnContext.SendActivityAsync(msg, cancellationToken); }