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

IsValidQualifiedName() public method

Checks if the item id identified by the is a valid area or source.
public IsValidQualifiedName ( string itemId, bool isArea ) : bool
itemId string
isArea bool
return bool
        public bool IsValidQualifiedName(string itemId, bool isArea)
        {
            Session session = m_server.Session;

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

            lock (m_lock)
            {
                // find the root.
                Stack<string> names = new Stack<string>();
                AeBrowseElement root = FindRoot(itemId, names);

                // find the target.
                AeBrowseElement target = Find(session, itemId, root, names, isArea);

                if (target == null)
                {
                    return false;
                }

                return true;
            }
        }