ReplaceNodeList() public method

Replaces the test nodes in the list.
public ReplaceNodeList ( IList nodes, IList newNodes, NamespaceTable namespaceUris ) : void
nodes IList
newNodes IList
namespaceUris NamespaceTable
return void
Ejemplo n.º 1
0
        private void Test_BrowseRootsMI_Click(object sender, EventArgs e)
        {
            try
            {
                using (Session session = CreateSession())
                {
                    List <NodeId> nodeIds = m_testConfiguration.GetNodeList(m_testConfiguration.BrowseRoots, session.NamespaceUris);

                    IList <ILocalNode> nodes = new SelectNodesDlg().ShowDialog(session, null, nodeIds);

                    if (nodes != null)
                    {
                        if (m_testConfiguration.BrowseRoots == null)
                        {
                            m_testConfiguration.BrowseRoots = new ListOfTestNode();
                        }

                        m_testConfiguration.ReplaceNodeList(m_testConfiguration.BrowseRoots, nodes, session.NamespaceUris);
                    }
                }
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }