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; }
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); }
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); }