Skip to content

Commit 79ca155

Browse files
Taritsyndustinsoftware
authored andcommitted
Added support of the JavaScript Engine Switcher version 3.0.0 Beta and JSPool version 3.1.0 Beta 1 (reactjs#551)
1 parent 5cbcd22 commit 79ca155

35 files changed

+216
-274
lines changed

src/React.Core/AssemblyRegistration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void Register(TinyIoCContainer container)
3535
// One instance shared for the whole app
3636
container.Register<IReactSiteConfiguration>((c, o) => ReactSiteConfiguration.Configuration);
3737
container.Register<IFileCacheHash, FileCacheHash>().AsPerRequestSingleton();
38-
container.Register<JsEngineSwitcher>((c, o) => JsEngineSwitcher.Instance);
38+
container.Register<IJsEngineSwitcher>((c, o) => JsEngineSwitcher.Current);
3939
container.Register<IJavaScriptEngineFactory, JavaScriptEngineFactory>().AsSingleton();
4040
container.Register<IReactIdGenerator, ReactIdGenerator>().AsSingleton();
4141

src/React.Core/Exceptions/BabelException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when an error occurs when transforming a JavaScript file via Babel.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class BabelException : ReactException
@@ -33,7 +33,7 @@ public BabelException(string message) : base(message) { }
3333
public BabelException(string message, Exception innerException)
3434
: base(message, innerException) { }
3535

36-
#if NET40
36+
#if !NETSTANDARD1_6
3737
/// <summary>
3838
/// Used by deserialization
3939
/// </summary>

src/React.Core/Exceptions/BabelNotLoadedException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when Babel is required but has not been loaded.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class BabelNotLoadedException : ReactException
@@ -25,7 +25,7 @@ public class BabelNotLoadedException : ReactException
2525
/// </summary>
2626
public BabelNotLoadedException() : base(GetMessage()) { }
2727

28-
#if NET40
28+
#if !NETSTANDARD1_6
2929
/// <summary>
3030
/// Used by deserialization
3131
/// </summary>

src/React.Core/Exceptions/ClearScriptV8InitialisationException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when the ClearScript V8 JavaScript engine fails to initialise
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ClearScriptV8InitialisationException : ReactException
@@ -26,7 +26,7 @@ public class ClearScriptV8InitialisationException : ReactException
2626
public ClearScriptV8InitialisationException(Exception innerException) :
2727
base(GetMessage(innerException), innerException) { }
2828

29-
#if NET40
29+
#if !NETSTANDARD1_6
3030
/// <summary>
3131
/// Used by deserialization
3232
/// </summary>

src/React.Core/Exceptions/ReactConfigurationException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when an error occurs while reading a site configuration file.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactConfigurationException : ReactException
@@ -33,7 +33,7 @@ public ReactConfigurationException(string message) : base(message) { }
3333
public ReactConfigurationException(string message, Exception innerException)
3434
: base(message, innerException) { }
3535

36-
#if NET40
36+
#if !NETSTANDARD1_6
3737
/// <summary>
3838
/// Used by deserialization
3939
/// </summary>

src/React.Core/Exceptions/ReactEngineNotFoundException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when no valid JavaScript engine is found.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactEngineNotFoundException : ReactException
@@ -31,7 +31,7 @@ public ReactEngineNotFoundException() : base(GetMessage()) { }
3131
/// <param name="message">The message that describes the error.</param>
3232
public ReactEngineNotFoundException(string message) : base(message) { }
3333

34-
#if NET40
34+
#if !NETSTANDARD1_6
3535
/// <summary>
3636
/// Used by deserialization
3737
/// </summary>

src/React.Core/Exceptions/ReactException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Base class for all ReactJS.NET exceptions
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactException : Exception
@@ -37,7 +37,7 @@ public ReactException(string message) : base(message) { }
3737
public ReactException(string message, Exception innerException)
3838
: base(message, innerException) { }
3939

40-
#if NET40
40+
#if !NETSTANDARD1_6
4141
/// <summary>
4242
/// Used by deserialization
4343
/// </summary>

src/React.Core/Exceptions/ReactInvalidComponentException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when a non-existent component is rendered.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactInvalidComponentException : ReactException
@@ -33,7 +33,7 @@ public ReactInvalidComponentException(string message) : base(message) { }
3333
public ReactInvalidComponentException(string message, Exception innerException)
3434
: base(message, innerException) { }
3535

36-
#if NET40
36+
#if !NETSTANDARD1_6
3737
/// <summary>
3838
/// Used by deserialization
3939
/// </summary>

src/React.Core/Exceptions/ReactNotInitialisedException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when React has not been initialised correctly.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactNotInitialisedException : ReactException
@@ -34,7 +34,7 @@ public ReactNotInitialisedException(string message) : base(message) { }
3434
public ReactNotInitialisedException(string message, Exception innerException)
3535
: base(message, innerException) { }
3636

37-
#if NET40
37+
#if !NETSTANDARD1_6
3838
/// <summary>
3939
/// Used by deserialization
4040
/// </summary>

src/React.Core/Exceptions/ReactScriptLoadException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2014-Present, Facebook, Inc.
33
* All rights reserved.
44
*
@@ -15,7 +15,7 @@ namespace React.Exceptions
1515
/// <summary>
1616
/// Thrown when an error is encountered while loading a JavaScript file.
1717
/// </summary>
18-
#if NET40
18+
#if !NETSTANDARD1_6
1919
[Serializable]
2020
#endif
2121
public class ReactScriptLoadException : ReactException
@@ -34,7 +34,7 @@ public ReactScriptLoadException(string message) : base(message) { }
3434
public ReactScriptLoadException(string message, Exception innerException)
3535
: base(message, innerException) { }
3636

37-
#if NET40
37+
#if !NETSTANDARD1_6
3838
/// <summary>
3939
/// Used by deserialization
4040
/// </summary>

0 commit comments

Comments
 (0)