DotNetBrowser  1.14
Public Member Functions | Protected Member Functions | Properties | List of all members
DotNetBrowser.BrowserContext Class Reference

Describes context of a Browser instance and provides path to the directory where user data files such as cookies, history, cache will be stored. Two Browser instances with the same BrowserContext will share the same session data (e.g. cookies, cache etc.). More...

Inherits IDisposable.

Public Member Functions

 BrowserContext (BrowserContextParams browserContextParams)
 Constructs a new BrowserContext instance with specified parameters. More...
 
void Dispose ()
 Dispose object and free all resources More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Dispose object and free all resources More...
 

Properties

static BrowserContext DefaultContext [get]
 Gets default browser context that is used in the BrowserFactory.Create() method. More...
 
ZoomService ZoomService [get]
 ZoomService associated with the current context. More...
 
NetworkService NetworkService [get]
 NetworkService associated with the current context. More...
 
SpellCheckerService SpellCheckerService [get]
 Returns SpellCheckerService associated with the current context. More...
 
NotificationService NotificationService [get]
 Gets NotificationService associated with the current context. More...
 
IProtocolService ProtocolService [get]
 Gets IProtocolHandler associated with the current context. More...
 
int ID [get]
 Gets a value that uniquely identifies this BrowserContext instance. More...
 
string DataDir [get]
 Gets absolute path to the directory where user data files will be stored. More...
 
string CacheDir [get]
 Gets absolute path to the directory where cache files will be stored. More...
 
StorageType StorageType [get]
 Returns Chromium data storage type for the current context provided via the BrowserContextParams.StorageType property. More...
 
string AcceptLanguage [get, set]
 Gets or sets a string that represents accept language for all Browser instances associated with this BrowserContext. More...
 
ProxyConfig ProxyConfig [get, set]
 Gets or sets proxy configuration of the current browser context instance or null if no proxy configuration was provided during Browser context instance instantiation. More...
 

Detailed Description

Describes context of a Browser instance and provides path to the directory where user data files such as cookies, history, cache will be stored. Two Browser instances with the same BrowserContext will share the same session data (e.g. cookies, cache etc.).

Constructor & Destructor Documentation

DotNetBrowser.BrowserContext.BrowserContext ( BrowserContextParams  browserContextParams)

Constructs a new BrowserContext instance with specified parameters.

Parameters
browserContextParamsrepresents parameters for the current context such as absolute path to the directory where user data files will be stored (e.g. history, cookies, cache), proxy settings, etc. Cannot be null.
Exceptions
ArgumentNullExceptionwhen browserContextParams is null.

Member Function Documentation

void DotNetBrowser.BrowserContext.Dispose ( )

Dispose object and free all resources

virtual void DotNetBrowser.BrowserContext.Dispose ( bool  disposing)
protectedvirtual

Dispose object and free all resources

Parameters
disposingTrue if managed resources should be disposed.

Property Documentation

string DotNetBrowser.BrowserContext.AcceptLanguage
getset

Gets or sets a string that represents accept language for all Browser instances associated with this BrowserContext.

Exceptions
ArgumentNullExceptionwhen value set null.
ArgumentExceptionwhen value set empty.
string DotNetBrowser.BrowserContext.CacheDir
get

Gets absolute path to the directory where cache files will be stored.

string DotNetBrowser.BrowserContext.DataDir
get

Gets absolute path to the directory where user data files will be stored.

BrowserContext DotNetBrowser.BrowserContext.DefaultContext
staticget

Gets default browser context that is used in the BrowserFactory.Create() method.

int DotNetBrowser.BrowserContext.ID
get

Gets a value that uniquely identifies this BrowserContext instance.

NetworkService DotNetBrowser.BrowserContext.NetworkService
get

NetworkService associated with the current context.

NotificationService DotNetBrowser.BrowserContext.NotificationService
get

Gets NotificationService associated with the current context.

IProtocolService DotNetBrowser.BrowserContext.ProtocolService
get

Gets IProtocolHandler associated with the current context.

ProxyConfig DotNetBrowser.BrowserContext.ProxyConfig
getset

Gets or sets proxy configuration of the current browser context instance or null if no proxy configuration was provided during Browser context instance instantiation.

SpellCheckerService DotNetBrowser.BrowserContext.SpellCheckerService
get

Returns SpellCheckerService associated with the current context.

StorageType DotNetBrowser.BrowserContext.StorageType
get

Returns Chromium data storage type for the current context provided via the BrowserContextParams.StorageType property.

ZoomService DotNetBrowser.BrowserContext.ZoomService
get

ZoomService associated with the current context.