/// <summary> /// Closes the dialog if current DialogSession exists and is running. /// </summary> public void CloseDialog() { if (DialogSession != null && !DialogSession.IsEnded) { DialogSession.Close(); DialogSession = null; } }
public Task StartAsync(Message message, IDialogContext context, IDialogSession session) { throw new System.NotImplementedException(); }
public DialogOpenedEventArgs(IDialogSession session) { Session = session; }
/// <summary> /// Should be used only as a second argument of DialogHost.Show method. /// Reads the session of an opening dialog in order to be able to close it later. /// </summary> /// <param name="source">Object that called the event</param> /// <param name="args">Event arguments containing DialogSession</param> private void DialogOpenedEventHandler(object source, DialogOpenedEventArgs args) { DialogSession = args.Session; }