From 1c1666adadddca8577ed6fd9d5ca2c014cdb9088 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 18 Mar 2014 03:25:03 +0900 Subject: [PATCH] Modified WebSocket.Dispose method to as IDisposable.Dispose method --- websocket-sharp/WebSocket.cs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index f1144854..f45522c7 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -716,8 +716,7 @@ namespace WebSocketSharp private void close (CloseStatusCode code, string reason, bool wait) { - close ( - new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait); + close (new PayloadData (((ushort) code).Append (reason)), !code.IsReserved (), wait); } private void close (PayloadData payload, bool send, bool wait) @@ -1773,17 +1772,6 @@ namespace WebSocketSharp null); } - /// - /// Closes the WebSocket connection, and releases all associated resources. - /// - /// - /// This method closes the WebSocket connection with . - /// - public void Dispose () - { - Close (CloseStatusCode.Away, null); - } - /// /// Sends a Ping using the WebSocket connection. /// @@ -2125,5 +2113,20 @@ namespace WebSocketSharp } #endregion + + #region Explicit Interface Implementation + + /// + /// Closes the WebSocket connection, and releases all associated resources. + /// + /// + /// This method closes the WebSocket connection with . + /// + void IDisposable.Dispose () + { + Close (CloseStatusCode.Away, null); + } + + #endregion } }