Opc.Ua.ServerTest.MainForm.Test_BrowseRootsMI_Click C# (CSharp) Method

Test_BrowseRootsMI_Click() private method

private Test_BrowseRootsMI_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        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);
            }
        }