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

BrowseUp() public method

Moves the current browse position up.
public BrowseUp ( ) : void
return void
        public void BrowseUp()
        {
            Session session = m_server.Session;

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

            // determine the parent id.
            string parentId = String.Empty;

            lock (m_lock)
            {
                // can't browse up from root.
                if (String.IsNullOrEmpty(m_position.ItemId))
                {
                    throw ComUtils.CreateComException(ResultIds.E_FAIL);
                }

                // get parent id.
                int index = m_position.ItemId.LastIndexOf('/');

                if (index != -1)
                {
                    parentId = m_position.ItemId.Substring(0, index);
                }
            }

            // browse to the parent.
            BrowseTo(parentId);
        }