Esempio n. 1
0
        private static void AddReferencedObj(KBObjectCollection objColl, KBObject obj, string tabs)
        {
            IKBService     kbserv = UIServices.KB;
            IOutputService output = CommonServices.Output;

            objColl.Add(obj);
            string RefTabs = tabs + "    ";

            if (ObjectsHelper.IsCallalable(obj))
            {
                foreach (EntityReference reference in obj.GetReferences())
                {
                    KBObject objRef = KBObject.Get(obj.Model, reference.To);

                    if ((objRef != null) && !(objColl.Contains(objRef)) && (reference.ReferenceType == ReferenceType.Hard) && (ObjectsHelper.IsCallalable(objRef)))
                    {
                        if (!(objRef is Procedure))
                        {
                            output.AddLine(tabs + "XCOPY " + objRef.Name + ".DLL %DESTINO% "); //+ " (" + obj.TypeDescriptor.Name + ")" );
                        }
                        AddReferencedObj(objColl, objRef, RefTabs);
                    }
                }
            }
        }
Esempio n. 2
0
        public static void List2(KBObject obj, string objLocation, Dictionary <string, KBObjectCollection> dic, KBDoctorXMLWriter writer)
        {
            string objMasterPage = obj.GetPropertyValueString("MasterPage");

            writer.AddTableData(new string[] { obj.TypeDescriptor.Name, Functions.linkObject(obj), objLocation, objMasterPage });
            if (ObjectsHelper.IsCallalable(obj))
            {
                foreach (EntityReference reference in obj.GetReferences())
                {
                    KBObject      objRef         = KBObject.Get(obj.Model, reference.To);
                    string        typeDescriptor = obj.TypeDescriptor.Name;
                    List <string> list           = new List <string> {
                        "WebPanel", "Transaction", "WorkPanel"
                    };

                    if ((objRef != null) && list.Contains(typeDescriptor) && (reference.ReferenceType == ReferenceType.Hard))
                    {
                        int                count     = 0;
                        string             locations = "";
                        KBObjectCollection objColl   = new KBObjectCollection();
                        foreach (string loc in dic.Keys)
                        {
                            if ((loc != objLocation) && (list.Contains(objRef.TypeDescriptor.Name)))
                            {
                                dic.TryGetValue(loc, out objColl);
                                if (objColl.Contains(obj))
                                {
                                    locations += " " + loc;
                                    count     += 1;
                                }
                            }
                        }
                        if (count > 0)
                        {
                            string objRefMasterPage = objRef.GetPropertyValueString("MasterPage");
                            writer.AddTableData(new string[] { "+-----Called >>" + objRef.TypeDescriptor.Name, Functions.linkObject(objRef), count.ToString() + "-" + locations, objRefMasterPage });
                        }
                    }
                }
            }
        }