Click or drag to resize

AsyncExtensions.DeleteCookiesAsync Method

Version 99.2.120
Deletes all cookies that matches all the provided parameters asynchronously. If both url and name are empty, all cookies will be deleted.

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: 99.2.120.0 (99.2.120.0)
Syntax
public static Task<int> DeleteCookiesAsync(
	this ICookieManager cookieManager,
	string url = null,
	string name = null
)

Parameters

cookieManager
Type: CefSharp.ICookieManager
cookie manager
url (Optional)
Type: System.String
The cookie URL. If an empty string is provided, any URL will be matched.
name (Optional)
Type: System.String
The name of the cookie. If an empty string is provided, any URL will be matched.

Return Value

Type: Task<Int32>
Returns -1 if a non-empty invalid URL is specified, or if cookies cannot be accessed; otherwise, a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICookieManager. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also