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

Find() private method

Finds the area/source with the specified identifier.
private Find ( Session session, string itemId, bool isArea ) : AeBrowseElement
session Opc.Ua.Client.Session
itemId string
isArea bool
return AeBrowseElement
        private AeBrowseElement Find(Session session, string itemId, bool isArea)
        {
            // check if it has been cached.
            AeBrowseElement target = null;

            if (m_cache.TryGetValue(itemId, out target))
            {
                if (target.IsArea == isArea)
                {
                    return target;
                }

                return null;
            }

            // find the first parent that is already cached.
            Stack<string> names = new Stack<string>();
            AeBrowseElement root = FindRoot(itemId, names);

            // browse for the node in the server.
            try
            {
                return Find(session, itemId, root, names, isArea);
            }
            catch
            {
                return null;
            }
        }

Same methods

ComAe2Browser::Find ( Session session, string itemId, AeBrowseElement root, Stack names, bool isArea ) : AeBrowseElement