public DelegatingKeyboardInteractiveUserInfo(
     PromptString promptPassphrase,
     PromptString promptPassword,
     PromptBool promptYesNo,
     Show showMessage,
     KeyboardInteractive promptKeyboardInteractive
     )
 {
     if (promptPassphrase != null)
     {
         _promptPassphrase = promptPassphrase;
     }
     if (promptPassword != null)
     {
         _promptPassword = promptPassword;
     }
     if (promptYesNo != null)
     {
         _promptYesNo = promptYesNo;
     }
     if (showMessage != null)
     {
         _showMessage = showMessage;
     }
     if (promptKeyboardInteractive != null)
     {
         _promptKeyboardInteractive = promptKeyboardInteractive;
     }
 }
 public DelegatingKeyboardInteractiveUserInfo(
     PromptString promptPassphrase,
     PromptString promptPassword,
     PromptBool promptYesNo,
     Show showMessage,
     KeyboardInteractive promptKeyboardInteractive
     )
 {
     if (promptPassphrase != null) _promptPassphrase = promptPassphrase;
     if (promptPassword != null) _promptPassword = promptPassword;
     if (promptYesNo != null) _promptYesNo = promptYesNo;
     if (showMessage != null) _showMessage = showMessage;
     if (promptKeyboardInteractive != null) _promptKeyboardInteractive = promptKeyboardInteractive;
 }
    public static void Text(IDialogContext context, ResumeAfter <string> resume, IPromptOptions <string> promptOptions)
    {
        var child = new PromptString(promptOptions);

        context.Call <string>(child, resume);
    }
Example #4
0
        /// <summary>   Prompt for a string. </summary>
        /// <param name="context">  The context. </param>
        /// <param name="resume">   Resume handler. </param>
        /// <param name="prompt">   The prompt to show to the user. </param>
        /// <param name="retry">    What to show on retry. </param>
        /// <param name="attempts"> The number of times to retry. </param>
        public static void Text(IDialogContext context, ResumeAfter <string> resume, string prompt, string retry = null, int attempts = 3)
        {
            var child = new PromptString(prompt, retry, attempts);

            context.Call <string>(child, resume);
        }
Example #5
0
        /// <summary>   Prompt for a string. </summary>
        /// <param name="context">  The context. </param>
        /// <param name="resume">   Resume handler. </param>
        /// <param name="prompt">   The prompt to show to the user. </param>
        /// <param name="retry">    What to show on retry. </param>
        /// <param name="attempts"> The number of times to retry. </param>
        /// <param name="suppressRessourceTexts"> Suppress ressource texts. </param>
        public static void Text(IDialogContext context, ResumeAfter <string> resume, string prompt, string retry = null, int attempts = 3, bool suppressRessourceTexts = false)
        {
            var child = new PromptString(prompt, retry, attempts, suppressRessourceTexts: suppressRessourceTexts);

            context.Call <string>(child, resume);
        }