[Modify] Add it

This commit is contained in:
sta 2019-04-25 16:19:11 +09:00
parent 09bcf0520e
commit bc7063858d

View File

@ -664,6 +664,27 @@ namespace WebSocketSharp.Net
_list.Clear ();
}
/// <summary>
/// Determines whether the collection contains the specified cookie.
/// </summary>
/// <returns>
/// <c>true</c> if the cookie is found in the collection; otherwise,
/// <c>false</c>.
/// </returns>
/// <param name="cookie">
/// A <see cref="Cookie"/> to find.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="cookie"/> is <see langword="null"/>.
/// </exception>
public bool Contains (Cookie cookie)
{
if (cookie == null)
throw new ArgumentNullException ("cookie");
return search (cookie) > -1;
}
/// <summary>
/// Copies the elements of the collection to the specified array,
/// starting at the specified index.