forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNiLJsEngineFactory.cs
More file actions
53 lines (43 loc) · 1.06 KB
/
NiLJsEngineFactory.cs
File metadata and controls
53 lines (43 loc) · 1.06 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.NiL
{
/// <summary>
/// NiL JS engine factory
/// </summary>
public sealed class NiLJsEngineFactory : IJsEngineFactory
{
/// <summary>
/// Settings of the NiL JS engine
/// </summary>
private readonly NiLSettings _settings;
/// <summary>
/// Constructs an instance of the NiL JS engine factory
/// </summary>
public NiLJsEngineFactory()
: this(new NiLSettings())
{ }
/// <summary>
/// Constructs an instance of the NiL JS engine factory
/// </summary>
/// <param name="settings">Settings of the NiL JS engine</param>
public NiLJsEngineFactory(NiLSettings settings)
{
_settings = settings;
}
#region IJsEngineFactory implementation
/// <inheritdoc/>
public string EngineName
{
get { return NiLJsEngine.EngineName; }
}
/// <summary>
/// Creates a instance of the NiL JS engine
/// </summary>
/// <returns>Instance of the NiL JS engine</returns>
public IJsEngine CreateEngine()
{
return new NiLJsEngine(_settings);
}
#endregion
}
}