diff options
| author | Cody Robibero <cody@robibe.ro> | 2023-06-29 05:44:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-29 05:44:36 -0600 |
| commit | b5bbb98175e0542d43c01f80c15e8dce04e58b53 (patch) | |
| tree | cd2af363318415710fa97fa5be42075046bcadbc /MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs | |
| parent | 76939bbd9bebb622759422f262c2490b56ab5a16 (diff) | |
Fix Websocket OpenApi (#9935)
* Further split inbound and outbound messages
* Fix datatype for inbound start messages
* fixes from review
Diffstat (limited to 'MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs')
| -rw-r--r-- | MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs b/MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs new file mode 100644 index 000000000..f09f294b4 --- /dev/null +++ b/MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs @@ -0,0 +1,33 @@ +#pragma warning disable SA1649 // File name must equal class name. + +using System; + +namespace MediaBrowser.Controller.Net.WebSocketMessages; + +/// <summary> +/// Outbound websocket message with data. +/// </summary> +/// <typeparam name="T">The data type.</typeparam> +public class OutboundWebSocketMessage<T> : WebSocketMessage<T>, IOutboundWebSocketMessage +{ + /// <summary> + /// Initializes a new instance of the <see cref="OutboundWebSocketMessage{T}"/> class. + /// </summary> + public OutboundWebSocketMessage() + { + } + + /// <summary> + /// Initializes a new instance of the <see cref="OutboundWebSocketMessage{T}"/> class. + /// </summary> + /// <param name="data">The data to send.</param> + protected OutboundWebSocketMessage(T data) + { + Data = data; + } + + /// <summary> + /// Gets or sets the message id. + /// </summary> + public Guid MessageId { get; set; } +} |
