/// <summary> /// Find all ArchitectTypes that reference this Type /// </summary> /// <param name="includingSelf"></param> /// <returns></returns> public ArchList <ArchitectType> ReferentTypes(bool includingSelf) { ArchList <ArchitectType> alist = new ArchList <ArchitectType>(); Members.ForEach(M => alist.AddRange(M.ReferentTypes(includingSelf))); return(alist.Clean()); }
/// <summary> /// ArchitectMembers of this type that are referenced by other members /// </summary> /// <param name="includingSelf"></param> /// <returns></returns> public ArchList <ArchitectMember> ReferentMembers(bool includingSelf) { // found by reverse analyzing each type ReferencedMembers ArchList <ArchitectMember> alist = new ArchList <ArchitectMember>(); Members.ForEach(M => alist.AddRange(M.ReferentMembers(includingSelf))); return(alist.Clean()); }
/// <summary> /// Post-initialization Architech Types Referenced /// </summary> /// <param name="includingSelf"></param> /// <returns></returns> public ArchList <ArchitectType> ReferencedTypes(bool includingSelf) { ArchList <ArchitectType> alist = new ArchList <ArchitectType>(); if (referencedTypes == null) { DirectRefTypes.ForEach(a => alist.Add(DeclaringType.Architecture.Types.Find(A => A.Class == a))); referencedTypes = alist; } else { referencedTypes.ForEach(M => alist.Add(M)); } if (!includingSelf) { alist.RemoveAll(A => A.FullName.Contains(DeclaringType.Name)); } return(alist.Clean()); }
/// <summary> /// Post-initialization Architech Types Referenced /// </summary> /// <param name="includingSelf"></param> /// <returns></returns> public ArchList <ArchitectType> ReferentTypes(bool includingSelf) { ArchList <ArchitectType> alist = new ArchList <ArchitectType>(); if (referentTypes == null) { DeclaringType.Architecture.Types.ForEach(A => { A.Members.FindAll(M => M.ReferencedTypes(includingSelf).Contains(DeclaringType)).ForEach(M => alist.Add(M.DeclaringType)); }); referentTypes = alist; } else { referentTypes.ForEach(M => alist.Add(M)); } if (!includingSelf) { alist.RemoveAll(A => A.FullName.Contains(DeclaringType.Name)); } return(alist.Clean()); }
/// <summary> /// Post-initialization Architech Members Referenced /// </summary> /// <param name="includingSelf"></param> /// <returns></returns> public ArchList <ArchitectMember> ReferentMembers(bool includingSelf) { ArchList <ArchitectMember> alist = new ArchList <ArchitectMember>(); if (referentMembers == null) { DeclaringType.Architecture.Types.ForEach(A => { alist.AddRange(A.Members.FindAll(M => M.ReferencedMembers(includingSelf).Contains(this))); }); referentMembers = alist; } else { referentMembers.ForEach(M => alist.Add(M)); } if (!includingSelf) { alist.RemoveAll(M => M.DeclaringType == DeclaringType); } return(alist.Clean()); }