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