├── packager.sh
├── src
├── react-native
│ ├── app.aps
│ ├── app.ico
│ ├── app.rc
│ ├── resource.h
│ ├── Stdafx.h
│ ├── Stdafx.cpp
│ ├── MyWrapper.h
│ ├── Logger.h
│ ├── react-native.h
│ ├── MyWrapper.cpp
│ ├── Logger.cpp
│ ├── AssemblyInfo.cpp
│ ├── JSCoreObjectWrapper.h
│ ├── JSObject.h
│ ├── ReadMe.txt
│ ├── JSCoreMarshal.h
│ ├── react-native.vcxproj.filters
│ ├── JSCoreMarshal.cpp
│ ├── JSObject.cpp
│ └── react-native.cpp
├── SampleApp
│ ├── IShell.cs
│ ├── App.xaml.cs
│ ├── App.config
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── ShellView.xaml.cs
│ ├── App.xaml
│ ├── CefSampleView.xaml.cs
│ ├── packages.config
│ ├── WebSocketSampleView.xaml.cs
│ ├── ShellView.xaml
│ ├── WebSocketSampleView.xaml
│ ├── ShellViewModel.cs
│ ├── CefJavascriptExecutor.cs
│ ├── WebSocketSampleViewModel.cs
│ ├── CefSampleView.xaml
│ ├── SampleAppBootstrapper.cs
│ └── CefSampleViewModel.cs
├── ReactNative
│ ├── Framework
│ │ ├── IBridgeModule.cs
│ │ ├── IJavaScriptExecutor.cs
│ │ ├── Views
│ │ │ ├── ReactItemsControl.cs
│ │ │ ├── ContainerViewManager.cs
│ │ │ ├── ReactTextBlockView.cs
│ │ │ ├── TextBlockViewManager.cs
│ │ │ ├── ReactRootViewModel.cs
│ │ │ ├── VisualTreeExtensions.cs
│ │ │ ├── ButtonViewManager.cs
│ │ │ └── StackPanelViewManager.cs
│ │ ├── ReactMethodAttribute.cs
│ │ ├── ReactModuleAttribute.cs
│ │ ├── ReactEventsExtensions.cs
│ │ ├── IReactBridge.cs
│ │ ├── IReactAssemblyProvider.cs
│ │ ├── Converters
│ │ │ ├── StringToOrientationConverter.cs
│ │ │ └── ColorToBrushConverter.cs
│ │ ├── ReactComponentBase.cs
│ │ ├── ReactContainerComponentBase.cs
│ │ ├── ViewManager.cs
│ │ ├── EventDispatcher.cs
│ │ ├── ExtensionMethods.cs
│ │ ├── ModuleMethod.cs
│ │ ├── RelayCommand.cs
│ │ ├── ModuleLoader.cs
│ │ ├── ModuleData.cs
│ │ ├── ReactComponentData.cs
│ │ ├── WebSocketExecutor.cs
│ │ └── ReactBridgeImpl.cs
│ ├── packages.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── ReactNative.csproj
└── JSCoreExecutor
│ ├── JavaScriptCoreExecutor.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── JSCoreExecutor.csproj
├── JavaScriptCore
├── deps
│ ├── ASL.dll
│ ├── WTF.dll
│ ├── objc.dll
│ ├── icudt49.dll
│ ├── libicuin.dll
│ ├── libicuuc.dll
│ ├── libdispatch.dll
│ ├── CoreFoundation.dll
│ └── JavaScriptCore.dll
├── lib
│ └── JavaScriptCore.lib
└── include
│ └── JavaScriptCore
│ ├── JavaScriptCore.h
│ ├── JavaScript.h
│ ├── JSContextRefPrivate.h
│ ├── JSStringRefBSTR.h
│ ├── JSWeakObjectMapRefInternal.h
│ ├── JSStringRefCF.h
│ ├── OpaqueJSString.h
│ ├── JSObjectRefPrivate.h
│ ├── APIShims.h
│ ├── JSWeakObjectMapRefPrivate.h
│ ├── APICast.h
│ ├── JSContextRef.h
│ ├── JSStringRef.h
│ ├── JSRetainPtr.h
│ └── JSBase.h
├── .gitignore
├── wpf
├── Container.js
├── Button.js
├── TextBlock.js
├── StackPanel.js
├── renderApplication.wpf.js
├── react-native-wpf.js
├── index.ios.js
└── ReactNativeDefaultInjection.wpf.js
├── package.json
├── LICENSE.md
├── readme.md
└── react-native.sln
/packager.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | "node_modules/react-native/packager/packager.sh" "$@"
4 |
--------------------------------------------------------------------------------
/src/react-native/app.aps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/src/react-native/app.aps
--------------------------------------------------------------------------------
/src/react-native/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/src/react-native/app.ico
--------------------------------------------------------------------------------
/src/react-native/app.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/src/react-native/app.rc
--------------------------------------------------------------------------------
/JavaScriptCore/deps/ASL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/ASL.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/WTF.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/WTF.dll
--------------------------------------------------------------------------------
/src/SampleApp/IShell.cs:
--------------------------------------------------------------------------------
1 | namespace SampleApp
2 | {
3 | public interface IShell
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/JavaScriptCore/deps/objc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/objc.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/icudt49.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/icudt49.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/libicuin.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/libicuin.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/libicuuc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/libicuuc.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/libdispatch.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/libdispatch.dll
--------------------------------------------------------------------------------
/src/react-native/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by app.rc
4 |
--------------------------------------------------------------------------------
/JavaScriptCore/lib/JavaScriptCore.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/lib/JavaScriptCore.lib
--------------------------------------------------------------------------------
/JavaScriptCore/deps/CoreFoundation.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/CoreFoundation.dll
--------------------------------------------------------------------------------
/JavaScriptCore/deps/JavaScriptCore.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joemcbride/react-native-wpf/HEAD/JavaScriptCore/deps/JavaScriptCore.dll
--------------------------------------------------------------------------------
/src/SampleApp/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace SampleApp
4 | {
5 | public partial class App : Application
6 | {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | .vs/
3 | bin/
4 | obj/
5 | Debug/
6 | Release/
7 | ipch/
8 | node_modules/
9 | packages/
10 |
11 | *.sdf
12 | *.opensdf
13 | *.suo
14 | *.user
15 | *.log
16 |
--------------------------------------------------------------------------------
/src/SampleApp/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/react-native/Stdafx.h:
--------------------------------------------------------------------------------
1 | // stdafx.h : include file for standard system include files,
2 | // or project specific include files that are used frequently,
3 | // but are changed infrequently
4 |
5 | #pragma once
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/react-native/Stdafx.cpp:
--------------------------------------------------------------------------------
1 | // stdafx.cpp : source file that includes just the standard includes
2 | // react-native.pch will be the pre-compiled header
3 | // stdafx.obj will contain the pre-compiled type information
4 |
5 | #include "stdafx.h"
6 |
--------------------------------------------------------------------------------
/src/SampleApp/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/react-native/MyWrapper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "JSCoreMarshal.h"
4 |
5 | JSValueRef wrapper_nativeLogging(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject,
6 | size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception);
7 |
--------------------------------------------------------------------------------
/src/SampleApp/ShellView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace SampleApp
4 | {
5 | public partial class ShellView : Window
6 | {
7 | public ShellView()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/IBridgeModule.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ReactNative.Framework
4 | {
5 | public interface IBridgeModule
6 | {
7 | void Initialize(IReactBridge bridge);
8 |
9 | IDictionary ConstantsToExport();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/ReactNative/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/wpf/Container.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @providesModule Container
3 | */
4 |
5 | var createReactNativeComponentClass =
6 | require('createReactNativeComponentClass');
7 |
8 |
9 | var viewConfig = {
10 | validAttributes: {
11 | backgroundColor: true
12 | },
13 | uiViewClassName: 'ReactContainer',
14 | };
15 |
16 | var Container = createReactNativeComponentClass(viewConfig);
17 |
18 | module.exports = Container;
19 |
--------------------------------------------------------------------------------
/wpf/Button.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @providesModule Button
3 | */
4 |
5 | var createReactNativeComponentClass =
6 | require('createReactNativeComponentClass');
7 |
8 |
9 | var viewConfig = {
10 | validAttributes: {
11 | text: true,
12 | backgroundColor: true
13 | },
14 | uiViewClassName: 'ReactButton',
15 | };
16 |
17 | var Button = createReactNativeComponentClass(viewConfig);
18 |
19 | module.exports = Button;
20 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/IJavaScriptExecutor.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace ReactNative.Framework
4 | {
5 | public interface IJavaScriptExecutor
6 | {
7 | Task Execute(string script, string sourceUrl);
8 | Task ExecuteJSCall(string name, string method, object[] arguments);
9 | Task InjectJSON(string objectName, string json);
10 | void Setup();
11 | }
12 | }
--------------------------------------------------------------------------------
/src/ReactNative/Framework/Views/ReactItemsControl.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 | using Caliburn.Micro;
3 |
4 | namespace ReactNative.Framework.Views
5 | {
6 | public class ReactItemsControl : ItemsControl
7 | {
8 | public ReactItemsControl()
9 | {
10 | SetBinding(ItemsSourceProperty, "Views");
11 | ItemTemplate = ConventionManager.DefaultItemTemplate;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/wpf/TextBlock.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @providesModule TextBlock
3 | */
4 |
5 | var createReactNativeComponentClass =
6 | require('createReactNativeComponentClass');
7 |
8 |
9 | var viewConfig = {
10 | validAttributes: {
11 | text: true,
12 | backgroundColor: true
13 | },
14 | uiViewClassName: 'ReactTextBlock',
15 | };
16 |
17 | var TextBlock = createReactNativeComponentClass(viewConfig);
18 |
19 | module.exports = TextBlock;
20 |
--------------------------------------------------------------------------------
/wpf/StackPanel.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @providesModule StackPanel
3 | */
4 |
5 | var createReactNativeComponentClass =
6 | require('createReactNativeComponentClass');
7 |
8 |
9 | var viewConfig = {
10 | validAttributes: {
11 | backgroundColor: true,
12 | orientation: true
13 | },
14 | uiViewClassName: 'ReactStackPanel',
15 | };
16 |
17 | var Container = createReactNativeComponentClass(viewConfig);
18 |
19 | module.exports = Container;
20 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/ReactMethodAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ReactNative.Framework
4 | {
5 | [AttributeUsage(AttributeTargets.Method)]
6 | public class ReactMethodAttribute : Attribute
7 | {
8 | public string Name { get; set; }
9 |
10 | public ReactMethodAttribute()
11 | {
12 | }
13 |
14 | public ReactMethodAttribute(string name)
15 | {
16 | Name = name;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/ReactModuleAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ReactNative.Framework
4 | {
5 | [AttributeUsage(AttributeTargets.Class)]
6 | public class ReactModuleAttribute : Attribute
7 | {
8 | public string Name { get; set; }
9 |
10 | public Type Type { get; set; }
11 |
12 | public ReactModuleAttribute()
13 | {
14 | }
15 |
16 | public ReactModuleAttribute(string name)
17 | {
18 | Name = name;
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/Views/ContainerViewManager.cs:
--------------------------------------------------------------------------------
1 | namespace ReactNative.Framework.Views
2 | {
3 | public class ReactContainerView : ReactItemsControl
4 | {
5 | }
6 |
7 | public class ReactContainerViewModel : ReactContainerComponentBase
8 | {
9 | }
10 |
11 | [ReactModule("ReactContainer")]
12 | public class ContainerViewManager : ViewManager
13 | {
14 | public override IReactComponent View()
15 | {
16 | return new ReactContainerViewModel();
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/react-native/Logger.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | using namespace System;
4 |
5 | public enum class LogLevel
6 | {
7 | Trace = 0,
8 | Log = 1,
9 | Info = 2,
10 | Warn = 3,
11 | Error = 4
12 | };
13 |
14 | ref class Logger
15 | {
16 | public:
17 | Logger();
18 |
19 | static void WriteLog(LogLevel level, String^ message);
20 | static void Log(String^ message);
21 | static void Error(String^ message);
22 | static void Error(String^ message, Exception^ exc);
23 | static void Error(Exception^ exc);
24 | };
25 |
26 |
--------------------------------------------------------------------------------
/src/SampleApp/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/Views/ReactTextBlockView.cs:
--------------------------------------------------------------------------------
1 | using ReactNative.Framework.Converters;
2 | using System.Windows.Controls;
3 | using System.Windows.Data;
4 |
5 | namespace ReactNative.Framework.Views
6 | {
7 | public class ReactTextBlockView : TextBlock
8 | {
9 | public ReactTextBlockView()
10 | {
11 | SetBinding(TextProperty, "Text");
12 |
13 | var backgroundBinding = new Binding("BackgroundColor");
14 | backgroundBinding.Converter = new ColorToBrushConverter();
15 | SetBinding(BackgroundProperty, backgroundBinding);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/wpf/renderApplication.wpf.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @providesModule renderApplicationWPF
3 | */
4 | let React = require('ReactNativeWPF');
5 | let invariant = require('invariant');
6 |
7 | function renderApplication(RootComponent, initialProps, rootTag) {
8 |
9 | //console.log('renderApplication', rootTag, initialProps);
10 |
11 | invariant(
12 | rootTag,
13 | 'Expect to have a valid rootTag, instead got ', rootTag
14 | );
15 |
16 | React.render(
17 | ,
21 | rootTag
22 | );
23 | };
24 |
25 | module.exports = renderApplication;
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-wpf",
3 | "version": "0.0.1",
4 | "description": "React Native for WPF",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "bundle":"react-native bundle --platform wpf --root ./wpf --out ./build/main.jsbundle",
9 | "wpf":"packager.sh --port 3333 --root ./wpf"
10 | },
11 | "author": "",
12 | "license": "MIT",
13 | "devDependencies": {
14 | "babel": "^5.8.21",
15 | "babel-core": "^5.8.22",
16 | "babel-loader": "^5.3.2",
17 | "webpack": "^1.11.0"
18 | },
19 | "dependencies": {
20 | "react-native": "^0.9.0"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/ReactEventsExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace ReactNative.Framework
2 | {
3 | public static class ReactEventsExtensions
4 | {
5 | public static string NormalizeInputEventName(this string eventName)
6 | {
7 | if (eventName.StartsWith("on"))
8 | {
9 | eventName = "top" + eventName.Substring(2);
10 | }
11 | else if (!eventName.StartsWith("top"))
12 | {
13 | eventName = "top" + eventName.Substring(0, 1).ToUpper() + eventName.Substring(1);
14 | }
15 |
16 | return eventName;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/ReactNative/Framework/IReactBridge.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 |
4 | namespace ReactNative.Framework
5 | {
6 | public interface IReactBridge
7 | {
8 | IEnumerable Modules { get; }
9 |
10 | Task LoadApplicationScript(string bundle, string sourceUrl);
11 |
12 | Task RunApplication(string moduleName, long rootTag, IDictionary initialProperties);
13 |
14 | Task Execute(string script, string sourceUrl);
15 |
16 | Task ExecuteJSCall(string name, string method, object[] arguments);
17 |
18 | void Reset();
19 | }
20 | }
--------------------------------------------------------------------------------
/src/SampleApp/CefSampleView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace SampleApp
4 | {
5 | public partial class CefSampleView : UserControl
6 | {
7 | public CefSampleView()
8 | {
9 | InitializeComponent();
10 |
11 | browser.RegisterJsObject("bound", new JSObject {SomeValue = "A value"});
12 | browser.ConsoleMessage += Browser_ConsoleMessage;
13 | }
14 |
15 | private void Browser_ConsoleMessage(object sender, CefSharp.ConsoleMessageEventArgs e)
16 | {
17 | System.Diagnostics.Debug.WriteLine("CEF ({0}): {1}", e.Line, e.Message);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/SampleApp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/ReactNative/Framework/Views/TextBlockViewManager.cs:
--------------------------------------------------------------------------------
1 | namespace ReactNative.Framework.Views
2 | {
3 | public class ReactTextBlockViewModel : ReactComponentBase
4 | {
5 | private string _text;
6 |
7 | public string Text
8 | {
9 | get { return _text; }
10 | set
11 | {
12 | _text = value;
13 | NotifyOfPropertyChange(() => Text);
14 | }
15 | }
16 | }
17 |
18 | [ReactModule("ReactTextBlock")]
19 | public class TextBlockViewManager : ViewManager
20 | {
21 | public override IReactComponent View()
22 | {
23 | return new ReactTextBlockViewModel();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/ReactNative/Framework/IReactAssemblyProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Reflection;
4 |
5 | namespace ReactNative.Framework
6 | {
7 | public interface IReactAssemblyProvider
8 | {
9 | IEnumerable Assemblies();
10 | }
11 |
12 | public class ReactAssemblyProvider : IReactAssemblyProvider
13 | {
14 | private readonly Func> _provideAssemblies;
15 |
16 | public ReactAssemblyProvider(Func> provideAssemblies)
17 | {
18 | _provideAssemblies = provideAssemblies;
19 | }
20 |
21 | public IEnumerable Assemblies()
22 | {
23 | return _provideAssemblies();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/SampleApp/WebSocketSampleView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace SampleApp
17 | {
18 | ///
19 | /// Interaction logic for WebSocketSampleView.xaml
20 | ///
21 | public partial class WebSocketSampleView : UserControl
22 | {
23 | public WebSocketSampleView()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/react-native/react-native.h:
--------------------------------------------------------------------------------
1 | // react-native.h
2 |
3 | #pragma once
4 |
5 | #include "JavaScriptCore\JavaScriptCore.h"
6 |
7 | using namespace System;
8 | using namespace System::Collections::Generic;
9 |
10 | namespace reactnative {
11 | public ref class ReactBridge
12 | {
13 | public:
14 | ReactBridge();
15 | String^ Execute(String^ script);
16 | String^ ExecuteJSCall(String^ name, String^ method, array