Opc.Ua.Client.NodeCache.FindReferences C# (CSharp) Method

FindReferences() public method

Returns the references of the specified node that meet the criteria specified.
public FindReferences ( ExpandedNodeId nodeId, NodeId referenceTypeId, bool isInverse, bool includeSubtypes ) : IList
nodeId ExpandedNodeId
referenceTypeId NodeId
isInverse bool
includeSubtypes bool
return IList
        public IList<INode> FindReferences(
            ExpandedNodeId nodeId, 
            NodeId         referenceTypeId, 
            bool           isInverse,
            bool           includeSubtypes)
        {            
            IList<INode> targets = new List<INode>();

            Node source = Find(nodeId) as Node;

            if (source == null)
            {
                return targets;
            }

            IList<IReference> references = source.ReferenceTable.Find(
                referenceTypeId, 
                isInverse, 
                includeSubtypes, 
                m_typeTree);

            foreach (IReference reference in references)
            {
                INode target = Find(reference.TargetId);

                if (target != null)
                {
                    targets.Add(target);
                }
            }

            return targets;
        }