Table of Contents

Method Create

Namespace
DotNetBrowser.Engine
Assembly
DotNetBrowser.Core.dll

Create(EngineOptions)

Creates and returns an IEngine instance.

public static IEngine Create(EngineOptions options)

Parameters

options EngineOptions

The EngineOptions instance that will be used for initializing the engine

Returns

IEngine

A completely initialized Chromium engine.

Examples

string dataDir = TestUtil.GenerateCustomFolderPath();
Debug.WriteLine($"Data directory: {dataDir}");
Directory.CreateDirectory(dataDir);

EngineOptions engineOptions = new EngineOptions.Builder
    {
        UserDataDirectory = dataDir
    }
   .Build();
IEngine engine = EngineFactory.Create(engineOptions);

Exceptions

EngineInitializationException

The IEngine initialization has failed for some reason.

Create(RenderingMode)

Creates and returns an IEngine instance.

public static IEngine Create(RenderingMode renderingMode)

Parameters

renderingMode RenderingMode

The rendering mode that will be used for initializing the engine.

Returns

IEngine

A completely initialized Chromium engine.

Remarks

Calling this method is equivalent to calling the Create(EngineOptions) method with the EngineOptions built by calling new EngineOptions.Builder().Build() with the rendering mode specified.

Exceptions

EngineInitializationException

The IEngine initialization has failed for some reason.

Create()

Creates and returns an IEngine instance.

public static IEngine Create()

Returns

IEngine

A completely initialized Chromium engine.

Remarks

Calling this method is equivalent to calling the Create(EngineOptions) method with the EngineOptions built by calling new EngineOptions.Builder().Build().

Exceptions

EngineInitializationException

The IEngine initialization has failed for some reason.