From bc7063858d2c3eb3da1bd33523e2c8ce894db3a7 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 25 Apr 2019 16:19:11 +0900 Subject: [PATCH] [Modify] Add it --- websocket-sharp/Net/CookieCollection.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index 99b5278a..022c2b6e 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -664,6 +664,27 @@ namespace WebSocketSharp.Net _list.Clear (); } + /// + /// Determines whether the collection contains the specified cookie. + /// + /// + /// true if the cookie is found in the collection; otherwise, + /// false. + /// + /// + /// A to find. + /// + /// + /// is . + /// + public bool Contains (Cookie cookie) + { + if (cookie == null) + throw new ArgumentNullException ("cookie"); + + return search (cookie) > -1; + } + /// /// Copies the elements of the collection to the specified array, /// starting at the specified index.