aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/WebSocketMessageOfT.cs
blob: 7c35c8010d3dc61dd8abd3c70f23546aa385dc1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#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>
// TODO make this abstract, remove empty ctor.
public class WebSocketMessage<T> : WebSocketMessage
{
    /// <summary>
    /// Initializes a new instance of the <see cref="WebSocketMessage{T}"/> class.
    /// </summary>
    public WebSocketMessage()
    {
    }

    /// <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; }
}