feat(Portable): Migrate most of Modules/Core and portions of DevSupport (#760)

* migrate most of Modules/Core and portions of DevSupport

* fix diff
This commit is contained in:
Kevin VanGelder 2016-10-10 17:06:22 -07:00 коммит произвёл Eric Rozell
Родитель c21c76cf16
Коммит 4b656c2337
14 изменённых файлов: 24 добавлений и 12 удалений

Просмотреть файл

@ -4,8 +4,13 @@ using ReactNative.Modules.DevSupport;
using System;
using System.Runtime.ExceptionServices;
using System.Threading.Tasks;
#if WINDOWS_UWP
using Windows.ApplicationModel.Core;
using Windows.UI.Core;
#else
using System.Threading;
using System.Windows.Threading;
#endif
namespace ReactNative.DevSupport
{
@ -65,10 +70,17 @@ namespace ReactNative.DevSupport
public async void HandleException(Exception exception)
{
#if WINDOWS_UWP
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
{
ExceptionDispatchInfo.Capture(exception).Throw();
}).AsTask().ConfigureAwait(false);
#else
await Dispatcher.CurrentDispatcher.InvokeAsync(() =>
{
ExceptionDispatchInfo.Capture(exception).Throw();
}, DispatcherPriority.Send).Task.ConfigureAwait(false);
#endif
}
public void HandleReloadJavaScript()

Просмотреть файл

@ -73,7 +73,19 @@
<Compile Include="$(MSBuildThisFileDirectory)Collections\ListExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Common\ReactConstants.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Common\WindowsPlatformHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\DebugServerException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\DisabledDevSupportManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\HMRClient.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\IDevSupportManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\IReactInstanceDevCommandsHandler.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\IStackFrame.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\StackFrameExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DevSupport\StackTraceHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\DeviceEventManagerModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\JavaScriptException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\JSTimersExecution.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\RCTDeviceEventEmitter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\RCTNativeAppEventEmitter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\Timing.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\DevSupport\IDeveloperSettings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\DevSupport\SourceCodeModule.cs" />

Просмотреть файл

@ -116,17 +116,12 @@
<Compile Include="Bridge\NativeModuleRegistry.cs" />
<Compile Include="Bridge\Queue\ReactQueueConfiguration.cs" />
<Compile Include="Chakra\Executor\NativeJavaScriptExecutor.cs" />
<Compile Include="DevSupport\DebugServerException.cs" />
<Compile Include="DevSupport\DevInternalSettings.cs" />
<Compile Include="DevSupport\DevOptionDialog.xaml.cs">
<DependentUpon>DevOptionDialog.xaml</DependentUpon>
</Compile>
<Compile Include="DevSupport\DevServerHelper.cs" />
<Compile Include="DevSupport\DevSupportManager.cs" />
<Compile Include="DevSupport\DisabledDevSupportManager.cs" />
<Compile Include="DevSupport\HMRClient.cs" />
<Compile Include="DevSupport\IReactInstanceDevCommandsHandler.cs" />
<Compile Include="DevSupport\IStackFrame.cs" />
<Compile Include="DevSupport\ProgressDialog.xaml.cs">
<DependentUpon>ProgressDialog.xaml</DependentUpon>
</Compile>
@ -134,20 +129,16 @@
<DependentUpon>RedBoxDialog.xaml</DependentUpon>
</Compile>
<Compile Include="DevSupport\ShakeAccelerometer.cs" />
<Compile Include="DevSupport\StackFrameExtensions.cs" />
<Compile Include="DevSupport\StackTraceHelper.cs" />
<Compile Include="Chakra\Executor\ChakraJavaScriptExecutor.cs" />
<Compile Include="Chakra\Executor\JTokenToJavaScriptValueConverter.cs" />
<Compile Include="Bridge\ReactBridge.cs" />
<Compile Include="CoreModulesPackage.cs" />
<Compile Include="DevSupport\IDevSupportManager.cs" />
<Compile Include="DevSupport\WebSocketJavaScriptExecutor.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Modules\AppState\AppStateModule.cs" />
<Compile Include="Modules\Clipboard\ClipboardInstance.cs" />
<Compile Include="Modules\Clipboard\ClipboardModule.cs" />
<Compile Include="Modules\Clipboard\IClipboardInstance.cs" />
<Compile Include="Modules\Core\JavaScriptException.cs" />
<Compile Include="Modules\Dialog\DialogModule.cs" />
<Compile Include="Modules\Image\BitmapImageHelpers.cs" />
<Compile Include="Modules\Image\ImageLoaderModule.cs" />
@ -192,9 +183,6 @@
<Compile Include="Modules\Core\ExceptionsManagerModule.cs" />
<Compile Include="Modules\WebSocket\WebSocketModule.cs" />
<Compile Include="ReactInstanceManager.cs" />
<Compile Include="Modules\Core\DeviceEventManagerModule.cs" />
<Compile Include="Modules\Core\RCTDeviceEventEmitter.cs" />
<Compile Include="Modules\Core\RCTNativeAppEventEmitter.cs" />
<Compile Include="IReactPackage.cs" />
<Compile Include="Shell\MainReactPackage.cs" />
<Compile Include="Touch\JavaScriptResponderHandler.cs" />