forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathV8Configuration.cs
More file actions
75 lines (69 loc) · 2.33 KB
/
V8Configuration.cs
File metadata and controls
75 lines (69 loc) · 2.33 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
namespace JavaScriptEngineSwitcher.V8.Configuration
{
using System.Configuration;
/// <summary>
/// Configuration settings of V8 JavaScript engine
/// </summary>
public sealed class V8Configuration : ConfigurationSection
{
/// <summary>
/// Gets or sets a flag for whether to enable script debugging features
/// (allows a TCP/IP-based debugging)
/// </summary>
[ConfigurationProperty("enableDebugging", DefaultValue = false)]
public bool EnableDebugging
{
get { return (bool)this["enableDebugging"]; }
set { this["enableDebugging"] = value; }
}
/// <summary>
/// Gets or sets a TCP/IP port on which to listen for a debugger connection
/// </summary>
[ConfigurationProperty("debugPort", DefaultValue = 9222)]
[IntegerValidator(MinValue = 0, MaxValue = 65535, ExcludeRange = false)]
public int DebugPort
{
get { return (int)this["debugPort"]; }
set { this["debugPort"] = value; }
}
/// <summary>
/// Gets or sets a flag for whether to disable global members
/// </summary>
[ConfigurationProperty("disableGlobalMembers", DefaultValue = false)]
public bool DisableGlobalMembers
{
get { return (bool)this["disableGlobalMembers"]; }
set { this["disableGlobalMembers"] = value; }
}
/// <summary>
/// Gets or sets a maximum size of the new object heap in bytes
/// </summary>
[ConfigurationProperty("maxNewSpaceSize", DefaultValue = 0)]
[IntegerValidator(MinValue = 0, MaxValue = int.MaxValue, ExcludeRange = false)]
public int MaxNewSpaceSize
{
get { return (int)this["maxNewSpaceSize"]; }
set { this["maxNewSpaceSize"] = value; }
}
/// <summary>
/// Gets or sets a maximum size of the old object heap in bytes
/// </summary>
[ConfigurationProperty("maxOldSpaceSize", DefaultValue = 0)]
[IntegerValidator(MinValue = 0, MaxValue = int.MaxValue, ExcludeRange = false)]
public int MaxOldSpaceSize
{
get { return (int)this["maxOldSpaceSize"]; }
set { this["maxOldSpaceSize"] = value; }
}
/// <summary>
/// Gets or sets a maximum size of the executable code heap in bytes
/// </summary>
[ConfigurationProperty("maxExecutableSize", DefaultValue = 0)]
[IntegerValidator(MinValue = 0, MaxValue = int.MaxValue, ExcludeRange = false)]
public int MaxExecutableSize
{
get { return (int)this["maxExecutableSize"]; }
set { this["maxExecutableSize"] = value; }
}
}
}