ChannelRequestEventArgs.cs 948 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using Renci.SshNet.Messages.Connection;
  3. namespace Renci.SshNet.Common
  4. {
  5. /// <summary>
  6. /// Provides data for <see cref="Channels.Channel.RequestReceived"/> event.
  7. /// </summary>
  8. internal sealed class ChannelRequestEventArgs : EventArgs
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="ChannelRequestEventArgs"/> class.
  12. /// </summary>
  13. /// <param name="info">Request information.</param>
  14. /// <exception cref="ArgumentNullException"><paramref name="info"/> is <see langword="null"/>.</exception>
  15. public ChannelRequestEventArgs(RequestInfo info)
  16. {
  17. ThrowHelper.ThrowIfNull(info);
  18. Info = info;
  19. }
  20. /// <summary>
  21. /// Gets the request information.
  22. /// </summary>
  23. /// <value>
  24. /// The request information.
  25. /// </value>
  26. public RequestInfo Info { get; }
  27. }
  28. }