WebSocketConnectEventArgs.cs 1.9 KB

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