ErrorEventArgs.cs 1020 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. namespace SocketHttpListener
  3. {
  4. /// <summary>
  5. /// Contains the event data associated with a <see cref="WebSocket.OnError"/> event.
  6. /// </summary>
  7. /// <remarks>
  8. /// A <see cref="WebSocket.OnError"/> event occurs when the <see cref="WebSocket"/> gets an error.
  9. /// If you would like to get the error message, you should access the <see cref="Message"/>
  10. /// property.
  11. /// </remarks>
  12. public class ErrorEventArgs : EventArgs
  13. {
  14. #region Private Fields
  15. private string _message;
  16. #endregion
  17. #region Internal Constructors
  18. internal ErrorEventArgs(string message)
  19. {
  20. _message = message;
  21. }
  22. #endregion
  23. #region Public Properties
  24. /// <summary>
  25. /// Gets the error message.
  26. /// </summary>
  27. /// <value>
  28. /// A <see cref="string"/> that represents the error message.
  29. /// </value>
  30. public string Message => _message;
  31. #endregion
  32. }
  33. }