CyPhy2CAD_CSharp.CommonTraversal.IsParent C# (CSharp) Method

IsParent() private method

private IsParent ( ISIS.GME.Dsml.CyPhyML.Interfaces conn, ISIS.GME.Dsml.CyPhyML.Interfaces topassembly ) : bool
conn ISIS.GME.Dsml.CyPhyML.Interfaces
topassembly ISIS.GME.Dsml.CyPhyML.Interfaces
return bool
        private bool IsParent(CyPhy.ConnectorComposition conn, CyPhy.ComponentAssembly topassembly)
        {
            GmeCommon.Interfaces.Container container = conn.ParentContainer;
            while (container != null)
            {
                if (container.Guid == topAssembly.Guid)
                {
                    return true;
                }

                container = container.ParentContainer;
            }
            return false;
        }