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

FindSubTypes() public method

Returns the immediate subtypes for the type.
public FindSubTypes ( ExpandedNodeId typeId ) : IList
typeId ExpandedNodeId The extended type identifier.
return IList
        public IList<NodeId> FindSubTypes(ExpandedNodeId typeId)
        {
            ILocalNode type = Find(typeId) as ILocalNode;

            if (type == null)
            {
                return new List<NodeId>();
            }

            List<NodeId> subtypes = new List<NodeId>();

            foreach (IReference reference in type.References.Find(ReferenceTypeIds.HasSubtype, false, true, m_typeTree))
            {
                if (!reference.TargetId.IsAbsolute)
                {
                    subtypes.Add((NodeId)reference.TargetId);
                }
            }

            return subtypes;
        }