[]
        
(Showing Draft Content)

GrapeCity.Documents.Html.BrowserFetcher

Class BrowserFetcher

Namespace
GrapeCity.Documents.Html
Assembly
GcDocs.Html.dll

Downloads and manages a version of a Chromium-based browser.

public class BrowserFetcher
Inheritance
object
BrowserFetcher
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

BrowserFetcher()

Initializes a new instance of the BrowserFetcher class.

public BrowserFetcher()

Properties

DefaultRevision

Gets the default revision of Chromium browser to check or download.

The value of this property is a subject to change in the future versions.

public static string DefaultRevision { get; }

Property Value

string
See Also

DestinationFolder

Gets or sets the destination folder for the downloads.

If this property is not set, the downloads are stored to [root]/.local-chromium, where [root] is where the project binaries are located.

public string DestinationFolder { get; set; }

Property Value

string

Platform

Gets or sets the browser platform. Defaults to the current platform.

public Platform Platform { get; set; }

Property Value

Platform

Revision

Gets or sets the specific Chromium revision to check or download.

If this property is not set, the DefaultRevision is used.

public string Revision { get; set; }

Property Value

string

WebProxy

Gets or sets the Proxy to be used by the WebClient.

public IWebProxy WebProxy { get; set; }

Property Value

System.Net.IWebProxy

Methods

CanDownload()

Initiates a HEAD request to check if the Chromium browser is available for download.

public bool CanDownload()

Returns

bool

GetDownloadedPath(bool)

Downloads the browser, if necessary, and returns a path to Chromium executable.

public string GetDownloadedPath(bool downloadIfNotExists = true)

Parameters

downloadIfNotExists bool

Whether to download the browser if it doesn't exist in the destination folder.

Returns

string

A path to Chromium executable or null if the browser is not downloaded.

GetDownloadUrl()

Gets the Url for downloading Chromium browser.

public string GetDownloadUrl()

Returns

string

GetLocalRevisions()

Returns a list of all revisions for the selected Platform available locally on disk.

public List<string> GetLocalRevisions()

Returns

System.Collections.Generic.List<T><string>

The list of available revisions.

GetSystemChromePath()

Gets the path to the Google Chrome browser executable installed in the operating system.

public static string GetSystemChromePath()

Returns

string

The path to the browser executable, or null if the browser was not found.

GetSystemEdgePath()

Gets the path to Microsoft Edge browser executable installed in the operating system.

public static string GetSystemEdgePath()

Returns

string

The path to the browser executable, or null if the browser was not found.

RemoveLocalRevision(string)

Removes a downloaded revision for the selected Platform.

public void RemoveLocalRevision(string revision)

Parameters

revision string

Revision to remove.

Events

DownloadProgressChanged

Occurs when an asynchronous download operation successfully transfers some or all of the data.

public event DownloadProgressChangedEventHandler DownloadProgressChanged

Event Type

System.Net.DownloadProgressChangedEventHandler