WebSocketConnectEventArgs.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Specialized;
  3. namespace MediaBrowser.Controller.Net
  4. {
  5. /// <summary>
  6. /// Class WebSocketConnectEventArgs
  7. /// </summary>
  8. public class WebSocketConnectEventArgs : EventArgs
  9. {
  10. /// <summary>
  11. /// Gets or sets the URL.
  12. /// </summary>
  13. /// <value>The URL.</value>
  14. public string Url { get; set; }
  15. /// <summary>
  16. /// Gets or sets the query string.
  17. /// </summary>
  18. /// <value>The query string.</value>
  19. public NameValueCollection QueryString { get; set; }
  20. /// <summary>
  21. /// Gets or sets the web socket.
  22. /// </summary>
  23. /// <value>The web socket.</value>
  24. public IWebSocket WebSocket { get; set; }
  25. /// <summary>
  26. /// Gets or sets the endpoint.
  27. /// </summary>
  28. /// <value>The endpoint.</value>
  29. public string Endpoint { get; set; }
  30. }
  31. public class WebSocketConnectingEventArgs : EventArgs
  32. {
  33. /// <summary>
  34. /// Gets or sets the URL.
  35. /// </summary>
  36. /// <value>The URL.</value>
  37. public string Url { get; set; }
  38. /// <summary>
  39. /// Gets or sets the endpoint.
  40. /// </summary>
  41. /// <value>The endpoint.</value>
  42. public string Endpoint { get; set; }
  43. /// <summary>
  44. /// Gets or sets the query string.
  45. /// </summary>
  46. /// <value>The query string.</value>
  47. public NameValueCollection QueryString { get; set; }
  48. /// <summary>
  49. /// Gets or sets a value indicating whether [allow connection].
  50. /// </summary>
  51. /// <value><c>true</c> if [allow connection]; otherwise, <c>false</c>.</value>
  52. public bool AllowConnection { get; set; }
  53. public WebSocketConnectingEventArgs()
  54. {
  55. QueryString = new NameValueCollection();
  56. AllowConnection = true;
  57. }
  58. }
  59. }