ICookieStore Interface |
Namespace: DotNetBrowser.Cookies
public interface ICookieStore : IAutoDisposable
The ICookieStore type exposes the following members.
Name | Description | |
---|---|---|
Engine |
Gets the IEngine instance associated with this object.
| |
IsDisposed |
Indicates if the object is already disposed.
(Inherited from IAutoDisposable.) | |
Profile |
Gets the IProfile instance associated with this object.
|
Name | Description | |
---|---|---|
Delete |
Deletes one specific cookie. The cookie instance can be received from
a list of cookies returned from the GetAllCookies(String) method.
| |
DeleteAllCookies |
Deletes all of the cookies including session, secure or HTTP only cookies.
| |
Flush |
Use this method to save all the changes you apply to this cookie storage.
By default all the changes to the cookie store are made in memory, so when
you restart the application you will not see the changes you made if you
don't invoke this method on application exit. You can invoke this method
after every change you made to cookie storage.
| |
GetAllCookies |
Returns all the cookies for given url including HTTP only cookies.
| |
SetCookie |
Sets a session cookie given explicit user-provided cookie attributes.
|
Name | Description | |
---|---|---|
Disposed |
Occurs when the object has been disposed.
(Inherited from IAutoDisposable.) |
The persistent cookies are stored in the Browser cache directory.
So, if Browser A and B have the same cache directory, then they will access the cookies of each other.
If you need to configure each Browser to use unique cookie storage which is not accessible for other Browser instances, you need to provide unique user data directory for each Browser instance. The user data directory path can be provided via configured UserDataDirectory object that must be passed into the EngineFactory.Create method.