forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsEngineFactoryCollectionExtensions.cs
More file actions
36 lines (33 loc) · 1.24 KB
/
JsEngineFactoryCollectionExtensions.cs
File metadata and controls
36 lines (33 loc) · 1.24 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
using JavaScriptEngineSwitcher.Core;
namespace JavaScriptEngineSwitcher.Msie
{
/// <summary>
/// JS engine factory collection extensions
/// </summary>
public static class JsEngineFactoryCollectionExtensions
{
/// <summary>
/// Adds a instance of <see cref="MsieJsEngineFactory"/> to
/// the specified <see cref="JsEngineFactoryCollection" />
/// </summary>
/// <param name="source">Instance of <see cref="JsEngineFactoryCollection" /></param>
/// <returns>Instance of <see cref="JsEngineFactoryCollection" /></returns>
public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection source)
{
return source.AddMsie(new MsieSettings());
}
/// <summary>
/// Adds a instance of <see cref="MsieJsEngineFactory"/> to
/// the specified <see cref="JsEngineFactoryCollection" />
/// </summary>
/// <param name="source">Instance of <see cref="JsEngineFactoryCollection" /></param>
/// <param name="settings">Settings of the MSIE JS engine</param>
/// <returns>Instance of <see cref="JsEngineFactoryCollection" /></returns>
public static JsEngineFactoryCollection AddMsie(this JsEngineFactoryCollection source,
MsieSettings settings)
{
source.Add(new MsieJsEngineFactory(settings));
return source;
}
}
}