From b5bbb98175e0542d43c01f80c15e8dce04e58b53 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Thu, 29 Jun 2023 05:44:36 -0600 Subject: Fix Websocket OpenApi (#9935) * Further split inbound and outbound messages * Fix datatype for inbound start messages * fixes from review --- .../OutboundWebSocketMessageOfT.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs (limited to 'MediaBrowser.Controller/Net/WebSocketMessages/OutboundWebSocketMessageOfT.cs') 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; + +/// +/// Outbound websocket message with data. +/// +/// The data type. +public class OutboundWebSocketMessage : WebSocketMessage, IOutboundWebSocketMessage +{ + /// + /// Initializes a new instance of the class. + /// + public OutboundWebSocketMessage() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The data to send. + protected OutboundWebSocketMessage(T data) + { + Data = data; + } + + /// + /// Gets or sets the message id. + /// + public Guid MessageId { get; set; } +} -- cgit v1.2.3