Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erics dev #6

Closed
wants to merge 19 commits into from
Closed

Erics dev #6

wants to merge 19 commits into from

Conversation

rozele
Copy link
Collaborator

@rozele rozele commented Dec 17, 2015

No description provided.

rozele and others added 18 commits December 15, 2015 09:19
Includes the NativeModuleBase (equivalent of the JavaBaseModule in ReactAndroid) and the NativeModuleRegistry.
Adds argument null checks, argument count checks, and wraps the argument extraction in a try/catch to to bubble as a NativeArgumentsParseException.

Adds additional unit tests for exception handling.
One limitation of the .NET framework is that there is no equivalent of the Proxy class in Java that is capable of instantiating interfaces and specifying an invocation handler.

Instead of using interfaces in the way they were used in the Android React implementation, this implementation just uses a base class and a settable property for an invocation handler.

The configuration writer is straight-forward, it just uses the JsonWriter from Newtonsoft.Json.
The initialization sequence of modules has changed, and now reflection checks will throw during the constructor call.
Decided to pursue an IJavaScriptExecutor after all. The reason is because the IJavaScriptExecutor can be pre-initialized the with React Native JavaScript library, without having any of that logic leak into the bridge or catalyst instance.

The IJavaScriptExecutor implementation uses Chakra, and we included some simple mapping visitors from JToken to JavaScriptValue and visa versa.

The current ReactBridge is a trivial wrapper around the IJavaScriptExecutor, that has some knowledge of the React Native protocols.

This changelist also includes some minor fixes to the DllImports for Chakra, which should eventually be refactored into a library (along with the JToken -> JavaScriptValue converters).
@rozele rozele closed this Dec 18, 2015
@rozele rozele deleted the erics-dev branch December 18, 2015 08:17
randy-flynn added a commit that referenced this pull request Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants