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

Represents parameters required for BrowserContext instance. Using BrowserContextParams you can configure BrowserContext with different settings such as Chromium data directory, default accept language, proxy settings, etc. More...

Public Member Functions

 BrowserContextParams (string dataDir)
 Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy. More...
 
 BrowserContextParams (string dataDir, string acceptLanguage)
 Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy. More...
 

Properties

string DataDir [get]
 Gets absolute path to the directory where user data files will be stored. More...
 
string AcceptLanguage [get, set]
 Gets or sets a string that represents accept language for all Browser instances associated with this BrowserContext. More...
 
string CacheDir [get, set]
 Gets or sets absolute path to the directory where Chromium engine will store cache. Java and Chromium processes must have rights to write to the directory. More...
 
ProxyConfig ProxyConfig [get, set]
 Gets or sets proxy configuration of the current browser instance or null if no proxy configuration was provided during Browser instance instantiation. More...
 
StorageType StorageType [get, set]
 Data storage type that defines how to store all the data such as cache, cookies, HTML5 WebStorage files, etc. More...
 

Detailed Description

Represents parameters required for BrowserContext instance. Using BrowserContextParams you can configure BrowserContext with different settings such as Chromium data directory, default accept language, proxy settings, etc.

Constructor & Destructor Documentation

DotNetBrowser.BrowserContextParams.BrowserContextParams ( string  dataDir)

Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy.

Parameters
dataDirabsolute location of the directory where Chromium will store data files. Cannot be null or empty.
Exceptions
ArgumentNullExceptionwhen dataDir is null, acceptLanguage is null.
ArgumentExceptionwhen dataDir is empty, acceptLanguage is empty.
DotNetBrowser.BrowserContextParams.BrowserContextParams ( string  dataDir,
string  acceptLanguage 
)

Constructs a new BrowserContextParams instance with specified dataDir and default accept language obtained via BrowserPreferences.getDefaultAcceptLanguage() method. The instance will automatically set cache and memory directory relative to the dataDir location. Proxy settings will be configured to use system proxy.

Parameters
dataDirabsolute location of the directory where Chromium will store data files. Cannot be null or empty.
acceptLanguagea string that represents default accept language (e.g. en-us). Cannot be null or empty.
Exceptions
ArgumentNullExceptionwhen dataDir is null, acceptLanguage is null.
ArgumentExceptionwhen dataDir is empty, acceptLanguage is empty.
ArgumentExceptionwhen acceptLanguage parameter is null or empty.

Property Documentation

string DotNetBrowser.BrowserContextParams.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.BrowserContextParams.CacheDir
getset

Gets or sets absolute path to the directory where Chromium engine will store cache. Java and Chromium processes must have rights to write to the directory.

Exceptions
ArgumentExceptionwhen cacheDir is null or empty.
string DotNetBrowser.BrowserContextParams.DataDir
get

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

ProxyConfig DotNetBrowser.BrowserContextParams.ProxyConfig
getset

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

StorageType DotNetBrowser.BrowserContextParams.StorageType
getset

Data storage type that defines how to store all the data such as cache, cookies, HTML5 WebStorage files, etc.