From 70ff5dc041efea4f94260a4d8fb6f15ea7ae6ad5 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 23 Apr 2019 13:36:51 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/CookieCollection.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index b63344f7..a466be68 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -648,6 +648,22 @@ namespace WebSocketSharp.Net add (cookie); } + /// + /// Removes all cookies from the collection. + /// + /// + /// The collection is read-only. + /// + public void Clear () + { + if (_readOnly) { + var msg = "The collection is read-only."; + throw new InvalidOperationException (msg); + } + + _list.Clear (); + } + /// /// Copies the elements of the collection to the specified array, /// starting at the specified index.