Exemplo n.º 1
0
        private static KBObjectCollection CreateListObjectsModuleAndReferences(KBModel kbModel, Module mdl, KBDoctorXMLWriter writer)
        {
            KBObjectCollection objToBuild = new KBObjectCollection();

            foreach (KBObject obj in mdl.GetAllMembers())
            {
                if (KBObjectHelper.IsSpecifiable(obj) && KBDoctorCore.Sources.Utility.isGenerated(obj))
                {
                    if (!objToBuild.Contains(obj))
                    {
                        objToBuild.Add(obj);
                        writer.AddTableData(new string[] { obj.QualifiedName.ToString(), obj.Description, obj.QualifiedName.ToString() + " (" + obj.TypeDescriptor.Name + ")" });
                    }
                }
                AddObjectsReferenceTo(obj, objToBuild, writer);
            }

            foreach (Table tbl in Table.GetAll(kbModel))
            {
                if (TablesHelper.TableModule(kbModel, tbl) == mdl)
                {
                    AddObjectsReferenceTo(tbl, objToBuild, writer);
                }
            }
            return(objToBuild);
        }
Exemplo n.º 2
0
        internal static KBObjectCollection ModuleObjects(Module module)
        {
            {
                KBObjectCollection objectsModule = new KBObjectCollection();
                foreach (KBObject obj in module.GetAllMembers())
                {
                    if (KBObjectHelper.IsSpecifiable(obj))
                    {
                        if (!objectsModule.Contains(obj))
                        {
                            objectsModule.Add(obj);
                        }
                    }
                }


                foreach (Table tbl in Table.GetAll(module.Model))

                {
                    if (TablesHelper.TableModule(module.Model, tbl) == module)
                    {
                        objectsModule.Add(tbl);
                    }
                }
                return(objectsModule);
            }
        }
Exemplo n.º 3
0
 public static void AddObjectsReferenceTo(KBObject obj, KBObjectCollection objToBuild, KBDoctorXMLWriter writer)
 {
     foreach (EntityReference refe in obj.GetReferencesTo())
     {
         KBObject objRef = KBObject.Get(obj.Model, refe.From);
         if (objRef != null && KBObjectHelper.IsSpecifiable(objRef) && !objToBuild.Contains(objRef) && KBDoctorCore.Sources.Utility.isGenerated(objRef))
         {
             objToBuild.Add(objRef);
             writer.AddTableData(new string[] { objRef.QualifiedName.ToString(), objRef.Description, obj.QualifiedName.ToString() + " (" + obj.TypeDescriptor.Name + ")" });
         }
     }
 }