forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVroomJsEngineFactory.cs
More file actions
53 lines (43 loc) · 1.09 KB
/
VroomJsEngineFactory.cs
File metadata and controls
53 lines (43 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using JavaScriptEngineSwitcher.Core;
namespace JavaScriptEngineSwitcher.Vroom
{
/// <summary>
/// Vroom JS engine factory
/// </summary>
public sealed class VroomJsEngineFactory : IJsEngineFactory
{
/// <summary>
/// Settings of the Vroom JS engine
/// </summary>
private readonly VroomSettings _settings;
/// <summary>
/// Constructs an instance of the Vroom JS engine factory
/// </summary>
public VroomJsEngineFactory()
: this(new VroomSettings())
{ }
/// <summary>
/// Constructs an instance of the Vroom JS engine factory
/// </summary>
/// <param name="settings">Settings of the Vroom JS engine</param>
public VroomJsEngineFactory(VroomSettings settings)
{
_settings = settings;
}
#region IJsEngineFactory implementation
/// <inheritdoc/>
public string EngineName
{
get { return VroomJsEngine.EngineName; }
}
/// <summary>
/// Creates a instance of the Vroom JS engine
/// </summary>
/// <returns>Instance of the Vroom JS engine</returns>
public IJsEngine CreateEngine()
{
return new VroomJsEngine(_settings);
}
#endregion
}
}