Ejemplo n.º 1
0
 public MethodeRegistre(string nom, string description, TypeRetourRegistre typeRetour, string algorithme)
 {
     this.Nom         = nom;
     this.Description = description;
     this.TypesRetour = typeRetour;
     this.Algorithme  = algorithme;
 }
Ejemplo n.º 2
0
 public MethodeRegistre(string nom, string description, List <ParametreRegistre> parametresMethode, TypeRetourRegistre typeRetour, string algorithme)
 {
     this.Nom                 = nom;
     this.Description         = description;
     this.ParametresRegistres = parametresMethode;
     this.TypesRetour         = typeRetour;
     this.Algorithme          = algorithme;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Fonction qui renvoie la liste de toutes les méthodes des Registres
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="nsmgr"></param>
        /// <returns></returns>
        public static List <MethodeRegistre> MethodesRegistres(XmlDocument doc, XmlNamespaceManager nsmgr, int i)
        {
            List <MethodeRegistre> methodes = new List <MethodeRegistre>();

            if (NombreMethodesRegistres(doc, nsmgr, i) != 0)
            {
                List <string> nomsMethodes = NomsMethodesRegistres(doc, nsmgr, i);

                for (int cmp = 0; cmp < NombreMethodesRegistres(doc, nsmgr, i); cmp++)
                {
                    string algorithmes  = AlgorithmesMethodesRegsitres(doc, nsmgr, i, cmp);
                    string descriptions = DescriptionsMethodesRegistres(doc, nsmgr, i, cmp);
                    List <ParametreRegistre> parametresMethodes = ParametreRegistre.ParametresMethodesEntites(doc, nsmgr, i, cmp);
                    TypeRetourRegistre       typesRetour        = TypeRetourRegistre.TypeRetourMethodesRegistres(doc, nsmgr, i, cmp);

                    if (typesRetour != null && parametresMethodes != null)
                    {
                        methodes.Add(new MethodeRegistre(nomsMethodes[cmp], descriptions, parametresMethodes, typesRetour, algorithmes));
                    }
                    else
                    {
                        if (typesRetour != null && parametresMethodes == null)
                        {
                            methodes.Add(new MethodeRegistre(nomsMethodes[cmp], descriptions, typesRetour, algorithmes));
                        }

                        else
                        {
                            if (parametresMethodes != null && typesRetour == null)
                            {
                                methodes.Add(new MethodeRegistre(nomsMethodes[cmp], descriptions, parametresMethodes, new TypeRetourRegistre("void", ""), algorithmes));
                            }
                            else
                            {
                                methodes.Add(new MethodeRegistre(nomsMethodes[cmp], descriptions, algorithmes));
                            }
                        }
                    }
                }
            }
            return(methodes);
        }