Exemple #1
0
 /// <summary>
 /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
 /// </summary>
 /// <param name="viewManagers">The view manager registry.</param>
 public NativeViewHierarchyManager(ViewManagerRegistry viewManagers)
 {
     _viewManagers       = viewManagers;
     _layoutAnimator     = new LayoutAnimationController();
     _tagsToViews        = new Dictionary <int, DependencyObject>();
     _tagsToViewManagers = new Dictionary <int, IViewManager>();
     _rootTags           = new Dictionary <int, bool>();
     _rootViewManager    = new RootViewManager();
 }
 /// <summary>
 /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
 /// </summary>
 /// <param name="viewManagers">The view manager registry.</param>
 public NativeViewHierarchyManager(ViewManagerRegistry viewManagers)
 {
     _viewManagers       = viewManagers;
     _layoutAnimator     = new LayoutAnimationController();
     _tagsToViews        = new Dictionary <int, Widget>();
     _tagsToViewManagers = new Dictionary <int, IViewManager>();
     _rootTags           = new Dictionary <int, bool>();
     //_jsResponderHandler = new JavaScriptResponderHandler();
     _rootViewManager = new RootViewManager();
 }
        /// <summary>
        /// Instantiates the <see cref="NativeViewHierarchyManager"/>.
        /// </summary>
        /// <param name="viewManagers">The view manager registry.</param>
        /// <param name="dispatcher">The dispatcher of the view.</param>
        /// <param name="onDropView">Notification callback to be passed lists of dropped views tags.</param>
        public NativeViewHierarchyManager(ViewManagerRegistry viewManagers,
#if WINDOWS_UWP
                                          CoreDispatcher dispatcher,
#else
                                          Dispatcher notUsed,
#endif
                                          Action <List <int> > onDropView
                                          )
        {
            _viewManagers       = viewManagers;
            _layoutAnimator     = new LayoutAnimationController();
            _tagsToViews        = new Dictionary <int, DependencyObject>();
            _tagsToViewManagers = new Dictionary <int, IViewManager>();
            _rootTags           = new Dictionary <int, bool>();
            _rootViewManager    = new RootViewManager();
#if WINDOWS_UWP
            Dispatcher = dispatcher;
#endif
            _deletedTagsBatchReporter = new DeletedTagsBatchReporter(onDropView);
        }