AuthenticationPromptEventArgs.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections.Generic;
  2. namespace Renci.SshNet.Common
  3. {
  4. /// <summary>
  5. /// Provides data for <see cref="KeyboardInteractiveConnectionInfo.AuthenticationPrompt"/> event.
  6. /// </summary>
  7. public class AuthenticationPromptEventArgs : AuthenticationEventArgs
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="AuthenticationPromptEventArgs"/> class.
  11. /// </summary>
  12. /// <param name="username">The username.</param>
  13. /// <param name="instruction">The instruction.</param>
  14. /// <param name="language">The language.</param>
  15. /// <param name="prompts">The information request prompts.</param>
  16. public AuthenticationPromptEventArgs(string username, string instruction, string language, IEnumerable<AuthenticationPrompt> prompts)
  17. : base(username)
  18. {
  19. Instruction = instruction;
  20. Language = language;
  21. Prompts = prompts;
  22. }
  23. /// <summary>
  24. /// Gets prompt language.
  25. /// </summary>
  26. public string Language { get; }
  27. /// <summary>
  28. /// Gets prompt instruction.
  29. /// </summary>
  30. public string Instruction { get; }
  31. /// <summary>
  32. /// Gets server information request prompts.
  33. /// </summary>
  34. public IEnumerable<AuthenticationPrompt> Prompts { get; }
  35. }
  36. }