/// <summary> /// Hook needed to cleanup the local state (_reactTagToOperationQueue) /// </summary> /// <param name="tags">List of deleted tags..</param> private void OnViewsDropped(List <int> tags) { // // We synchronize access to _reactTagToOperationQueue by using same action queue used by the other code paths. // Cleaning up can be done lazily, a way to mark this work unit as "Idle Scheduling" would benefit performance. if (_uiManagerActionQueue == null) { _uiManagerActionQueue = _reactContext.GetNativeModule <UIManagerModule>().ActionQueue; } _uiManagerActionQueue.Dispatch(() => { foreach (var tag in tags) { _reactTagToOperationQueue.Remove(tag); } }); }
/// <summary> /// Gets the instance of the <see cref="INativeModule"/> associated /// with the <see cref="IReactInstance"/>. /// </summary> /// <typeparam name="T">Type of native module.</typeparam> /// <returns>The native module instance.</returns> public T GetNativeModule <T>() where T : INativeModule { return(_reactContext.GetNativeModule <T>()); }