/// <summary> /// Instantiates the <see cref="IReactBridge"/>. /// </summary> /// <param name="executor">The JavaScript executor.</param> /// <param name="reactCallback">The native callback handler.</param> /// <param name="nativeModulesQueueThread"> /// The native modules queue thread. /// </param> public ReactBridge( IJavaScriptExecutor executor, IReactCallback reactCallback, IMessageQueueThread nativeModulesQueueThread) { if (executor == null) throw new ArgumentNullException(nameof(executor)); if (reactCallback == null) throw new ArgumentNullException(nameof(reactCallback)); if (nativeModulesQueueThread == null) throw new ArgumentNullException(nameof(nativeModulesQueueThread)); _jsExecutor = executor; _reactCallback = reactCallback; _nativeModulesQueueThread = nativeModulesQueueThread; }
/// <summary> /// Instantiates the <see cref="IReactBridge"/>. /// </summary> /// <param name="executor">The JavaScript executor.</param> /// <param name="reactCallback">The native callback handler.</param> /// <param name="nativeModulesQueueThread"> /// The native modules queue thread. /// </param> public ReactBridge( IJavaScriptExecutor executor, IReactCallback reactCallback, IMessageQueueThread nativeModulesQueueThread) { if (executor == null) { throw new ArgumentNullException(nameof(executor)); } if (reactCallback == null) { throw new ArgumentNullException(nameof(reactCallback)); } if (nativeModulesQueueThread == null) { throw new ArgumentNullException(nameof(nativeModulesQueueThread)); } _jsExecutor = executor; _reactCallback = reactCallback; _nativeModulesQueueThread = nativeModulesQueueThread; }
/// <summary> /// Instantiates the <see cref="IReactBridge"/>. /// </summary> /// <param name="executor">The JavaScript executor.</param> /// <param name="reactCallback">The native callback handler.</param> /// <param name="nativeModulesQueueThread"> /// The native modules queue thread. /// </param> public ReactBridge( IJavaScriptExecutor executor, IReactCallback reactCallback, IActionQueue nativeModulesQueueThread) { if (executor == null) { throw new ArgumentNullException(nameof(executor)); } if (reactCallback == null) { throw new ArgumentNullException(nameof(reactCallback)); } if (nativeModulesQueueThread == null) { throw new ArgumentNullException(nameof(nativeModulesQueueThread)); } _jsExecutor = executor; _reactCallback = reactCallback; _nativeModulesQueueThread = nativeModulesQueueThread; _jsExecutor.SetCallSyncHook(_reactCallback.InvokeSync); }