Opc.Ua.Sample.CustomNodeManager2.GetManagerHandle C# (CSharp) Method

GetManagerHandle() protected method

Returns a unique handle for the node.
This must efficiently determine whether the node belongs to the node manager. If it does belong to NodeManager it should return a handle that does not require the NodeId to be validated again when the handle is passed into other methods such as 'Read' or 'Write'.
protected GetManagerHandle ( ISystemContext context, NodeId nodeId, NodeState>.IDictionary cache ) : object
context ISystemContext
nodeId NodeId
cache NodeState>.IDictionary
return object
        protected virtual object GetManagerHandle(ISystemContext context, NodeId nodeId, IDictionary<NodeId,NodeState> cache)
        {
            lock (Lock)
            {
                // quickly exclude nodes that not in the namespace.
                if (!IsNodeIdInNamespace(nodeId))
                {
                    return null;
                }

                // lookup the node.
                NodeState node = null;

                if (!m_predefinedNodes.TryGetValue(nodeId, out node))
                {
                    return null;
                }

                return node;
            }
        }

Same methods

CustomNodeManager2::GetManagerHandle ( NodeId nodeId ) : object