Skip to content

Commit 13b7251

Browse files
committed
Version 1.2.4:
1. In `JsEngineBase` class all public non-abstract methods are now is virtual; 2. In JavaScriptEngineSwitcher.ConfigurationIntelliSense added definitions for configuration settings of Jurassic and Jint JavaScript engines; 3. In JavaScriptEngineSwitcher.Jurassic added the ability to change configuration settings of Jurassic JavaScript engine: `EnableDebugging` (default `false`), `EnableIlAnalysis` (default `false`) and `StrictMode` (default `false`); 4. In JavaScriptEngineSwitcher.Jint added the ability to change configuration settings of Jint JavaScript engine: `EnableDebugging` (default `false`), `MaxRecursionDepth` (default `20678`), `MaxStatements` (default `0`), `StrictMode` (default `false`) and `Timeout` (default `0`).
1 parent cb1697b commit 13b7251

File tree

53 files changed

+1094
-310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1094
-310
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change log
22
==========
33

4+
## February 19, 2015 - v1.2.4
5+
* In `JsEngineBase` class all public non-abstract methods are now is virtual
6+
* In JavaScriptEngineSwitcher.ConfigurationIntelliSense added definitions for configuration settings of Jurassic and Jint JavaScript engines
7+
* In JavaScriptEngineSwitcher.Jurassic added the ability to change configuration settings of Jurassic JavaScript engine: `EnableDebugging` (default `false`), `EnableIlAnalysis` (default `false`) and `StrictMode` (default `false`)
8+
* In JavaScriptEngineSwitcher.Jint added the ability to change configuration settings of Jint JavaScript engine: `EnableDebugging` (default `false`), `MaxRecursionDepth` (default `20678`), `MaxStatements` (default `0`), `StrictMode` (default `false`) and `Timeout` (default `0`)
9+
410
## February 16, 2015 - v1.2.3
511
* In JavaScriptEngineSwitcher.ConfigurationIntelliSense added definitions for configuration settings of V8 JavaScript engine
612
* In JavaScriptEngineSwitcher.V8 added support of Microsoft ClearScript.V8 version 5.4.1 (support of V8 version 3.30.33.16) and added the ability to change configuration settings of V8 JavaScript engine: `EnableDebugging` (default `false`), `DebugPort` (default `9222`), `DisableGlobalMembers` (default `false`), `MaxNewSpaceSize` (default `0`), `MaxOldSpaceSize` (default `0`) and `MaxExecutableSize` (default `0`)

JavaScriptEngineSwitcher.Core/EmptyValueException.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public sealed class EmptyValueException : Exception
99
{
1010
/// <summary>
11-
/// Initializes a new instance of the JavaScriptEngineSwitcher.Core.EmptyValueException class
11+
/// Initializes a new instance of the JavaScriptEngineSwitcher.Core.EmptyValueException class
1212
/// with a specified error message
1313
/// </summary>
1414
/// <param name="message">The message that describes the error</param>
@@ -17,7 +17,7 @@ public EmptyValueException(string message)
1717
{ }
1818

1919
/// <summary>
20-
/// Initializes a new instance of the JavaScriptEngineSwitcher.Core.EmptyValueException class
20+
/// Initializes a new instance of the JavaScriptEngineSwitcher.Core.EmptyValueException class
2121
/// with a specified error message and a reference to the inner exception that is the cause of this exception
2222
/// </summary>
2323
/// <param name="message">The error message that explains the reason for the exception</param>

JavaScriptEngineSwitcher.Core/Helpers/JsRuntimeErrorHelpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static string Format(JsRuntimeException jsRuntimeException)
7474
if (jsRuntimeException.ColumnNumber > 0)
7575
{
7676
errorMessage.AppendFormatLine("{0}: {1}", Strings.ErrorDetails_ColumnNumber,
77-
jsRuntimeException.ColumnNumber.ToString(CultureInfo.InvariantCulture));
77+
jsRuntimeException.ColumnNumber.ToString(CultureInfo.InvariantCulture));
7878
}
7979
if (!string.IsNullOrWhiteSpace(jsRuntimeException.SourceFragment))
8080
{

JavaScriptEngineSwitcher.Core/Helpers/ValidationHelpers.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System;
44
using System.Linq;
55
using System.Text.RegularExpressions;
6-
6+
77
/// <summary>
88
/// Validation helpers
99
/// </summary>
@@ -14,14 +14,14 @@ public static class ValidationHelpers
1414
/// </summary>
1515
private static readonly Type[] _supportedTypes =
1616
{
17-
typeof(Undefined), typeof(Boolean), typeof(Int32), typeof(Double), typeof(String)
17+
typeof(Undefined), typeof(Boolean), typeof(Int32), typeof(Double), typeof(String)
1818
};
1919

2020
/// <summary>
2121
/// Regular expression for working with JS-names
2222
/// </summary>
2323
private static readonly Regex _jsNameRegex = new Regex(@"^[A-Za-z_\$][0-9A-Za-z_\$]*$");
24-
24+
2525

2626
/// <summary>
2727
/// Checks whether supports a .NET type

JavaScriptEngineSwitcher.Core/JsEngineBase.cs

+14-14
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public abstract class JsEngineBase : IJsEngine
1919
protected bool _disposed;
2020

2121

22-
private void VerifyNotDisposed()
22+
protected void VerifyNotDisposed()
2323
{
2424
if (_disposed)
2525
{
@@ -60,7 +60,7 @@ public abstract string Version
6060
}
6161

6262

63-
public object Evaluate(string expression)
63+
public virtual object Evaluate(string expression)
6464
{
6565
VerifyNotDisposed();
6666

@@ -73,7 +73,7 @@ public object Evaluate(string expression)
7373
return InnerEvaluate(expression);
7474
}
7575

76-
public T Evaluate<T>(string expression)
76+
public virtual T Evaluate<T>(string expression)
7777
{
7878
VerifyNotDisposed();
7979

@@ -93,7 +93,7 @@ public T Evaluate<T>(string expression)
9393
return InnerEvaluate<T>(expression);
9494
}
9595

96-
public void Execute(string code)
96+
public virtual void Execute(string code)
9797
{
9898
VerifyNotDisposed();
9999

@@ -106,7 +106,7 @@ public void Execute(string code)
106106
InnerExecute(code);
107107
}
108108

109-
public void ExecuteFile(string path, Encoding encoding = null)
109+
public virtual void ExecuteFile(string path, Encoding encoding = null)
110110
{
111111
VerifyNotDisposed();
112112

@@ -120,7 +120,7 @@ public void ExecuteFile(string path, Encoding encoding = null)
120120
Execute(code);
121121
}
122122

123-
public void ExecuteResource(string resourceName, Type type)
123+
public virtual void ExecuteResource(string resourceName, Type type)
124124
{
125125
VerifyNotDisposed();
126126

@@ -140,7 +140,7 @@ public void ExecuteResource(string resourceName, Type type)
140140
Execute(code);
141141
}
142142

143-
public void ExecuteResource(string resourceName, Assembly assembly)
143+
public virtual void ExecuteResource(string resourceName, Assembly assembly)
144144
{
145145
VerifyNotDisposed();
146146

@@ -160,7 +160,7 @@ public void ExecuteResource(string resourceName, Assembly assembly)
160160
Execute(code);
161161
}
162162

163-
public object CallFunction(string functionName, params object[] args)
163+
public virtual object CallFunction(string functionName, params object[] args)
164164
{
165165
VerifyNotDisposed();
166166

@@ -200,7 +200,7 @@ public object CallFunction(string functionName, params object[] args)
200200
return InnerCallFunction(functionName, args);
201201
}
202202

203-
public T CallFunction<T>(string functionName, params object[] args)
203+
public virtual T CallFunction<T>(string functionName, params object[] args)
204204
{
205205
VerifyNotDisposed();
206206

@@ -247,7 +247,7 @@ public T CallFunction<T>(string functionName, params object[] args)
247247
return InnerCallFunction<T>(functionName, args);
248248
}
249249

250-
public bool HasVariable(string variableName)
250+
public virtual bool HasVariable(string variableName)
251251
{
252252
VerifyNotDisposed();
253253

@@ -266,7 +266,7 @@ public bool HasVariable(string variableName)
266266
return InnerHasVariable(variableName);
267267
}
268268

269-
public object GetVariableValue(string variableName)
269+
public virtual object GetVariableValue(string variableName)
270270
{
271271
VerifyNotDisposed();
272272

@@ -285,7 +285,7 @@ public object GetVariableValue(string variableName)
285285
return InnerGetVariableValue(variableName);
286286
}
287287

288-
public T GetVariableValue<T>(string variableName)
288+
public virtual T GetVariableValue<T>(string variableName)
289289
{
290290
VerifyNotDisposed();
291291

@@ -311,7 +311,7 @@ public T GetVariableValue<T>(string variableName)
311311
return InnerGetVariableValue<T>(variableName);
312312
}
313313

314-
public void SetVariableValue(string variableName, object value)
314+
public virtual void SetVariableValue(string variableName, object value)
315315
{
316316
VerifyNotDisposed();
317317

@@ -342,7 +342,7 @@ public void SetVariableValue(string variableName, object value)
342342
InnerSetVariableValue(variableName, value);
343343
}
344344

345-
public void RemoveVariable(string variableName)
345+
public virtual void RemoveVariable(string variableName)
346346
{
347347
VerifyNotDisposed();
348348

JavaScriptEngineSwitcher.Core/JsEngineLoadException.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public sealed class JsEngineLoadException : JsException
99
{
1010
/// <summary>
11-
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
11+
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
1212
/// with a specified error message
1313
/// </summary>
1414
/// <param name="message">The message that describes the error</param>
@@ -17,7 +17,7 @@ public JsEngineLoadException(string message)
1717
{ }
1818

1919
/// <summary>
20-
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
20+
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
2121
/// with a specified error message and a reference to the inner exception that is the cause of this exception
2222
/// </summary>
2323
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -27,7 +27,7 @@ public JsEngineLoadException(string message, Exception innerException)
2727
{ }
2828

2929
/// <summary>
30-
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
30+
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
3131
/// with a specified error message and a reference to the inner exception that is the cause of this exception
3232
/// </summary>
3333
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -38,14 +38,14 @@ public JsEngineLoadException(string message, string engineName, string engineVer
3838
{ }
3939

4040
/// <summary>
41-
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
41+
/// Initializes a new instance of the <see cref="JsEngineLoadException"/> class
4242
/// with a specified error message and a reference to the inner exception that is the cause of this exception
4343
/// </summary>
4444
/// <param name="message">The error message that explains the reason for the exception</param>
4545
/// <param name="engineName">Name of JavaScript engine</param>
4646
/// <param name="engineVersion">Version of original JavaScript engine</param>
4747
/// <param name="innerException">The exception that is the cause of the current exception</param>
48-
public JsEngineLoadException(string message, string engineName, string engineVersion,
48+
public JsEngineLoadException(string message, string engineName, string engineVersion,
4949
Exception innerException)
5050
: base(message, engineName, engineVersion, innerException)
5151
{ }

JavaScriptEngineSwitcher.Core/JsEngineNotFoundException.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public sealed class JsEngineNotFoundException : Exception
99
{
1010
/// <summary>
11-
/// Initializes a new instance of the <see cref="JsEngineNotFoundException"/> class
11+
/// Initializes a new instance of the <see cref="JsEngineNotFoundException"/> class
1212
/// with a specified error message
1313
/// </summary>
1414
/// <param name="message">The message that describes the error</param>
@@ -17,7 +17,7 @@ public JsEngineNotFoundException(string message)
1717
{ }
1818

1919
/// <summary>
20-
/// Initializes a new instance of the <see cref="JsEngineNotFoundException"/> class
20+
/// Initializes a new instance of the <see cref="JsEngineNotFoundException"/> class
2121
/// with a specified error message and a reference to the inner exception that is the cause of this exception
2222
/// </summary>
2323
/// <param name="message">The error message that explains the reason for the exception</param>

JavaScriptEngineSwitcher.Core/JsEngineSwitcher.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
using System;
44
using System.Configuration;
5-
5+
66
using Configuration;
77
using Resources;
88
using Utilities;
@@ -66,7 +66,7 @@ public IJsEngine CreateJsEngineInstance(string name)
6666
}
6767

6868
/// <summary>
69-
/// Creates a instance of default JavaScript engine based on the settings
69+
/// Creates a instance of default JavaScript engine based on the settings
7070
/// that specified in configuration files (App.config or Web.config)
7171
/// </summary>
7272
/// <returns>JavaScript engine</returns>

JavaScriptEngineSwitcher.Core/JsException.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public string EngineVersion
2727

2828

2929
/// <summary>
30-
/// Initializes a new instance of the <see cref="JsException"/> class
30+
/// Initializes a new instance of the <see cref="JsException"/> class
3131
/// with a specified error message
3232
/// </summary>
3333
/// <param name="message">The message that describes the error</param>
@@ -36,7 +36,7 @@ public JsException(string message)
3636
{ }
3737

3838
/// <summary>
39-
/// Initializes a new instance of the <see cref="JsException"/> class
39+
/// Initializes a new instance of the <see cref="JsException"/> class
4040
/// with a specified error message and a reference to the inner exception that is the cause of this exception
4141
/// </summary>
4242
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -46,7 +46,7 @@ public JsException(string message, Exception innerException)
4646
{ }
4747

4848
/// <summary>
49-
/// Initializes a new instance of the <see cref="JsException"/> class
49+
/// Initializes a new instance of the <see cref="JsException"/> class
5050
/// with a specified error message and a reference to the inner exception that is the cause of this exception
5151
/// </summary>
5252
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -57,7 +57,7 @@ public JsException(string message, string engineName, string engineVersion)
5757
{ }
5858

5959
/// <summary>
60-
/// Initializes a new instance of the <see cref="JsException"/> class
60+
/// Initializes a new instance of the <see cref="JsException"/> class
6161
/// with a specified error message and a reference to the inner exception that is the cause of this exception
6262
/// </summary>
6363
/// <param name="message">The error message that explains the reason for the exception</param>

JavaScriptEngineSwitcher.Core/JsRuntimeException.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public string SourceFragment
5353
}
5454

5555
/// <summary>
56-
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
56+
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
5757
/// with a specified error message
5858
/// </summary>
5959
/// <param name="message">The message that describes the error</param>
@@ -62,7 +62,7 @@ public JsRuntimeException(string message)
6262
{ }
6363

6464
/// <summary>
65-
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
65+
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
6666
/// with a specified error message and a reference to the inner exception that is the cause of this exception
6767
/// </summary>
6868
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -72,7 +72,7 @@ public JsRuntimeException(string message, Exception innerException)
7272
{ }
7373

7474
/// <summary>
75-
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
75+
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
7676
/// with a specified error message and a reference to the inner exception that is the cause of this exception
7777
/// </summary>
7878
/// <param name="message">The error message that explains the reason for the exception</param>
@@ -83,14 +83,14 @@ public JsRuntimeException(string message, string engineName, string engineVersio
8383
{ }
8484

8585
/// <summary>
86-
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
86+
/// Initializes a new instance of the <see cref="JsRuntimeException"/> class
8787
/// with a specified error message and a reference to the inner exception that is the cause of this exception
8888
/// </summary>
8989
/// <param name="message">The error message that explains the reason for the exception</param>
9090
/// <param name="engineName">Name of JavaScript engine</param>
9191
/// <param name="engineVersion">Version of original JavaScript engine</param>
9292
/// <param name="innerException">The exception that is the cause of the current exception</param>
93-
public JsRuntimeException(string message, string engineName, string engineVersion,
93+
public JsRuntimeException(string message, string engineName, string engineVersion,
9494
Exception innerException)
9595
: base(message, engineName, engineVersion, innerException)
9696
{

JavaScriptEngineSwitcher.Core/NotSupportedTypeException.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public sealed class NotSupportedTypeException : Exception
99
{
1010
/// <summary>
11-
/// Initializes a new instance of the <see cref="NotSupportedTypeException"/> class
11+
/// Initializes a new instance of the <see cref="NotSupportedTypeException"/> class
1212
/// with a specified error message
1313
/// </summary>
1414
/// <param name="message">The message that describes the error</param>
@@ -17,7 +17,7 @@ public NotSupportedTypeException(string message)
1717
{ }
1818

1919
/// <summary>
20-
/// Initializes a new instance of the <see cref="NotSupportedTypeException"/> class
20+
/// Initializes a new instance of the <see cref="NotSupportedTypeException"/> class
2121
/// with a specified error message and a reference to the inner exception that is the cause of this exception
2222
/// </summary>
2323
/// <param name="message">The error message that explains the reason for the exception</param>

JavaScriptEngineSwitcher.Core/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
[assembly: AssemblyConfiguration("")]
77
[assembly: AssemblyCompany("")]
88
[assembly: AssemblyProduct("JavaScript Engine Switcher for .Net: Core")]
9-
[assembly: AssemblyCopyright("Copyright © Andrey Taritsyn 2014")]
9+
[assembly: AssemblyCopyright("Copyright © 2013-2015 Andrey Taritsyn")]
1010
[assembly: AssemblyTrademark("")]
1111
[assembly: AssemblyCulture("")]
1212

1313
[assembly: ComVisible(false)]
1414
[assembly: Guid("9f7e9fff-da85-4609-8bee-bdead5a3afe2")]
1515

16-
[assembly: AssemblyVersion("1.2.0.0")]
17-
[assembly: AssemblyFileVersion("1.2.0.0")]
16+
[assembly: AssemblyVersion("1.2.4.0")]
17+
[assembly: AssemblyFileVersion("1.2.4.0")]

0 commit comments

Comments
 (0)