Exemple #1
0
        private static KBObject ExtractObject(string xmlstring)
        {
            IKBService  kbserv  = UIServices.KB;
            XmlDocument doc     = new XmlDocument();
            String      ObjName = "";

            try
            {
                doc.LoadXml(xmlstring);
                ObjName = doc.SelectSingleNode("ObjectSpec/Object/ObjName").InnerText;
                if (ObjName.EndsWith("_BC"))
                {
                    ObjName = ObjName.Replace("_BC", "");
                }
            }
            catch (Exception e) { };
            return(KbStats.ObjectPartialName(ObjName));
        }
Exemple #2
0
 public bool ExecCountGeneratedByPattern(CommandData cmdData)
 {
     KbStats.CountGeneratedByPattern();
     return(true);
 }
Exemple #3
0
 public bool ExecCompareLastOBJDirectory(CommandData cmdData)
 {
     KbStats.CompareLastOBJDirectory();
     return(true);
 }
Exemple #4
0
 public bool ExecOpenFolderObjComparerNavigation(CommandData cmdData)
 {
     KbStats.OpenFolderObjComparerNavigation();
     return(true);
 }
Exemple #5
0
 public bool ExecListLastReports(CommandData cmdData)
 {
     KbStats.ListLastReports();
     return(true);
 }
Exemple #6
0
        public static void KBInterfaces()
        {
            IKBService kbserv = UIServices.KB;
            KBModel    design = kbserv.CurrentModel;
            SpecificationListHelper helper = new SpecificationListHelper(design.Environment.TargetModel);

            string outputFile = kbserv.CurrentKB.UserDirectory + @"\kbdoctor.KBInterfaces.html";

            if (File.Exists(outputFile))
            {
                File.Delete(outputFile);
            }

            string         titulo = "KBDoctor - KB Interfaces";
            IOutputService output = CommonServices.Output;

            output.StartSection(titulo);


            KBDoctorXMLWriter writer = new KBDoctorXMLWriter(outputFile, Encoding.UTF8);

            writer.AddHeader(titulo);
            writer.AddTableHeader(new string[] { "Object", "Variable", "Type", "mains" });

            foreach (KBObject obj in kbserv.CurrentModel.Objects.GetAll())
            {
                if (obj != null)
                {
                    output.AddLine("Procesing  " + obj.Name);

                    IEnumerable <int> generatorTypes = KbStats.GetObjectGenerators(obj.Key);

                    string             objNamePrior = "";
                    KBObjectCollection objColl      = new KBObjectCollection();
                    string             tipo         = "";

                    string mainss = "";


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

                        if (objRef != null)
                        {
                            if (objRef is ExternalObject)
                            {
                                tipo = "External Object:" + objRef.GetPropertyValueString("ExoType");
                                writer.AddTableData(new string[] { Functions.linkObject(obj), Functions.linkObject(objRef), tipo, mainss });
                            }
                            else
                            {
                                if (objRef is MissingKBObject)
                                {
                                    tipo = "Missing Object";
                                    writer.AddTableData(new string[] { Functions.linkObject(obj), Functions.linkObject(objRef), tipo, mainss });
                                }
                            }
                        }
                    }


                    string sourceWOComments = Functions.ExtractComments(Functions.ObjectSourceUpper(obj));

                    sourceWOComments = sourceWOComments.Replace("\t", " ");

                    AddLineKBInterfazSource(writer, obj, "SHELL ", "CMD.", sourceWOComments, mainss);
                    AddLineKBInterfazSource(writer, obj, "JAVA ", "CMD.", sourceWOComments, mainss);
                    AddLineKBInterfazSource(writer, obj, "CSHARP ", "CMD.", sourceWOComments, mainss);
                    AddLineKBInterfazSource(writer, obj, "SQL ", "CMD.", sourceWOComments, mainss);


                    ObjectsVariablesExternal(obj, writer, mainss);
                    if (obj is Transaction || obj is WebPanel)
                    {
                        UserControlUsageCheck(obj, writer, mainss);
                    }
                }
            }

            writer.AddFooter();
            writer.Close();

            KBDoctorHelper.ShowKBDoctorResults(outputFile);
            bool success = true;

            output.EndSection(titulo, success);
        }