Пример #1
0
        public IRPlotDeviceVisualComponent GetOrCreateVisualComponent(IRPlotDeviceVisualComponentContainerFactory visualComponentContainerFactory, int instanceId) {
            _shell.AssertIsOnMainThread();

            IRPlotDeviceVisualComponent component;
            if (_visualComponents.TryGetValue(instanceId, out component)) {
                return component;
            }

            component = visualComponentContainerFactory.GetOrCreate(this, _interactiveWorkflow.RSession, instanceId).Component;
            _disposableBag.Add(component);
            _visualComponents[instanceId] = component;
            return component;
        }
Пример #2
0
        public IRPlotDeviceVisualComponent GetOrCreateVisualComponent(IRPlotDeviceVisualComponentContainerFactory visualComponentContainerFactory, int instanceId)
        {
            InteractiveWorkflow.Shell.AssertIsOnMainThread();

            IRPlotDeviceVisualComponent component;

            if (_visualComponents.TryGetValue(instanceId, out component))
            {
                return(component);
            }

            component = visualComponentContainerFactory.GetOrCreate(this, _interactiveWorkflow.RSession, instanceId).Component;
            _visualComponents[instanceId] = component;
            return(component);
        }
Пример #3
0
        public IRPlotDeviceVisualComponent GetOrCreateVisualComponent(IRPlotDeviceVisualComponentContainerFactory visualComponentContainerFactory, int instanceId)
        {
            _mainThread.CheckAccess();

            IRPlotDeviceVisualComponent component;

            if (_visualComponents.TryGetValue(instanceId, out component))
            {
                return(component);
            }

            component = visualComponentContainerFactory.GetOrCreate(this, _interactiveWorkflow.RSession, instanceId).Component;
            _disposableBag.Add(component);
            _visualComponents[instanceId] = component;
            return(component);
        }
Пример #4
0
 public static IRPlotDeviceVisualComponent GetOrCreateVisualComponent(this IRPlotManager pm, IRPlotDeviceVisualComponentContainerFactory factory, int id)
 => ((IRPlotManagerVisual)pm).GetOrCreateVisualComponent(factory, id);