AuthenticationPromptEventArgs.cs 1.5 KB

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