Opc.Ua.Com.Server.ComAe2Browser.BrowseDown C# (CSharp) Method

BrowseDown() public method

Moves the current browse position down.
public BrowseDown ( string targetName ) : void
targetName string
return void
        public void BrowseDown(string targetName)
        {
            Session session = m_server.Session;

            if (session == null)
            {
                throw ComUtils.CreateComException(ResultIds.E_FAIL);
            }

            lock (m_lock)
            {
                // check if this is the first access.
                if (m_position.Areas == null)
                {
                    Browse(true, String.Empty);
                }

                // find the area.
                if (m_position.Areas != null)
                {
                    for (int ii = 0; ii < m_position.Areas.Count; ii++)
                    {
                        if (m_position.Areas[ii].BrowseText == targetName)
                        {
                            m_position = m_position.Areas[ii];
                            return;
                        }
                    }
                }

                throw ComUtils.CreateComException(ResultIds.E_INVALIDBRANCHNAME);
            }
        }