Exemplo n.º 1
0
        public async void removeRootView(int rootViewTag)
        {
            // A cleanup task should be waiting here
            if (!_rootViewCleanupTasks.TryRemove(rootViewTag, out var cleanupTask))
            {
                throw new InvalidOperationException("Unexpected removeRootView");
            }

            await _uiImplementation.RemoveRootViewAsync(rootViewTag);

            cleanupTask.SetResult(true);
        }
        public async void removeRootView(int rootViewTag)
        {
            RnLog.Info(ReactConstants.RNW, $"UIManagerModule: removeRootView ({rootViewTag}) - entry");

            // A cleanup task should be waiting here
            if (!_rootViewCleanupTasks.TryRemove(rootViewTag, out var cleanupTask))
            {
                throw new InvalidOperationException("Unexpected removeRootView");
            }

            await _uiImplementation.RemoveRootViewAsync(rootViewTag);

            cleanupTask.SetResult(true);
            RnLog.Info(ReactConstants.RNW, $"UIManagerModule: removeRootView ({rootViewTag}) - done");
        }