From 0e0fdbdfbd977df50b834d1c4b8f25f460ad9115 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 13 Nov 2015 14:45:16 +0900 Subject: [PATCH] [Modify] Add a property Add IsText property to determine that the message type is text. --- websocket-sharp/MessageEventArgs.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs index 1ea9529c..5715f148 100644 --- a/websocket-sharp/MessageEventArgs.cs +++ b/websocket-sharp/MessageEventArgs.cs @@ -97,6 +97,18 @@ namespace WebSocketSharp } } + /// + /// Gets a value indicating whether the message type is text. + /// + /// + /// true if the message type is text; otherwise, false. + /// + public bool IsText { + get { + return _opcode == Opcode.Text; + } + } + /// /// Gets the message data as an array of . ///