Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. return await stepContext.BeginDialogAsync("loginprompt", cancellationToken: cancellationToken); // This actually calls the dialogue of OAuthPrompt whose name is in EchoWithCounterBot.LoginPromptName.
  2.  
  3.  
  4. });
  5.  
  6. AddStep(async (stepContext, cancellationToken) =>
  7. {
  8. Tokenresponse = (TokenResponse)stepContext.Result;
  9.  
  10. if (Tokenresponse != null)
  11. {
  12.  
  13. await stepContext.Context.SendActivityAsync($"logged in successfully... ");
  14.  
  15.  
  16. return await stepContext.BeginDialogAsync(DisplayOptionsDialog.Id); //Here it goes To another dialogue class where options are displayed
  17. }
  18. else
  19. {
  20. await stepContext.Context.SendActivityAsync("Login was not successful, Please try again...", cancellationToken: cancellationToken);
  21.  
  22.  
  23. await stepContext.BeginDialogAsync("loginprompt", cancellationToken: cancellationToken);
  24. }
  25.  
  26. return await stepContext.EndDialogAsync();
  27. });
  28. }
  29.  
  30. public static new string Id => "LoginDialog";
  31.  
  32. public static LoginDialog Instance { get; } = new LoginDialog(Id);
  33.  
  34. AddDialog(Prompt(ConnectionName));
  35. AddDialog(LoginDialog.Instance);
  36. InitialDialogId = LoginDialog.Id;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement