2023-06-10 06:28:21 -07:00
|
|
|
#pragma warning disable SA1649 // File name must equal class name.
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Net;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Class WebSocketMessage.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="T">The type of the data.</typeparam>
|
2023-07-02 15:14:44 -07:00
|
|
|
public abstract class WebSocketMessage<T> : WebSocketMessage
|
2023-06-10 06:28:21 -07:00
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="WebSocketMessage{T}"/> class.
|
|
|
|
/// </summary>
|
2023-07-02 15:14:44 -07:00
|
|
|
protected WebSocketMessage()
|
2023-06-10 06:28:21 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="WebSocketMessage{T}"/> class.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="data">The data to send.</param>
|
|
|
|
protected WebSocketMessage(T data)
|
|
|
|
{
|
|
|
|
Data = data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the data.
|
|
|
|
/// </summary>
|
|
|
|
// TODO make this set only.
|
|
|
|
public T? Data { get; set; }
|
|
|
|
}
|