TcpConnectionEventArgs.cs 538 B

123456789101112131415161718192021222324
  1. using System;
  2. namespace NModbus.Device
  3. {
  4. internal class TcpConnectionEventArgs : EventArgs
  5. {
  6. public TcpConnectionEventArgs(string endPoint)
  7. {
  8. if (endPoint == null)
  9. {
  10. throw new ArgumentNullException(nameof(endPoint));
  11. }
  12. if (endPoint == string.Empty)
  13. {
  14. throw new ArgumentException(Resources.EmptyEndPoint);
  15. }
  16. EndPoint = endPoint;
  17. }
  18. public string EndPoint { get; set; }
  19. }
  20. }