forked from ClearFoundry/ClearScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJScriptEngine.Unix.cs
More file actions
93 lines (78 loc) · 3.78 KB
/
Copy pathJScriptEngine.Unix.cs
File metadata and controls
93 lines (78 loc) · 3.78 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using Microsoft.ClearScript.JavaScript;
namespace Microsoft.ClearScript.Windows
{
/// <summary>
/// Represents an instance of the JScript engine.
/// </summary>
public class JScriptEngine : WindowsScriptEngine, IJavaScriptEngine
{
#region constructors
/// <summary>
/// Initializes a new JScript engine instance.
/// </summary>
public JScriptEngine()
: this(null)
{
}
/// <summary>
/// Initializes a new JScript engine instance with the specified name.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
public JScriptEngine(string name)
: this(name, WindowsScriptEngineFlags.None)
{
}
/// <summary>
/// Initializes a new JScript engine instance with the specified options.
/// </summary>
/// <param name="flags">A value that selects options for the operation.</param>
public JScriptEngine(WindowsScriptEngineFlags flags)
: this(null, flags)
{
}
/// <summary>
/// Initializes a new JScript engine instance with the specified name and options.
/// </summary>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="flags">A value that selects options for the operation.</param>
public JScriptEngine(string name, WindowsScriptEngineFlags flags)
: this("JScript", name, flags)
{
}
/// <summary>
/// Initializes a new JScript engine instance with the specified programmatic
/// identifier, name, and options.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the JScript engine class.</param>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="flags">A value that selects options for the operation.</param>
protected JScriptEngine(string progID, string name, WindowsScriptEngineFlags flags)
: this(progID, name, "js", flags)
{
}
/// <summary>
/// Initializes a new JScript engine instance with the specified programmatic
/// identifier, name, list of supported file name extensions, and options.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the JScript engine class.</param>
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
protected JScriptEngine(string progID, string name, string fileNameExtensions, WindowsScriptEngineFlags flags)
: base(progID, name, fileNameExtensions, flags)
{
}
#endregion
#region ScriptEngine overrides
/// <summary>
/// Gets the script engine's recommended file name extension for script files.
/// </summary>
public override string FileNameExtension => "js";
#endregion
#region IJavaScriptEngine implementation
uint IJavaScriptEngine.BaseLanguageVersion => 3;
#endregion
}
}