Example #1
0
        /// <summary>
        /// Methode qui renvoie la liste des colonnes des types de retour des methodes des services externes
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="nsmgr"></param>
        /// <returns></returns>
        public static TypeRetourInterfaceServiceExterne TypeRetourMethodesInterfaceServiceExterne(XmlDocument doc, XmlNamespaceManager nsmgr, int i, int cmp)
        {
            XmlNodeList   nodeList2;
            XmlElement    root = doc.DocumentElement;
            List <string> ListeTypeRetourInterfaceServiceExterne = new List <string>();

            if (MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1) != 0)
            {
                string xpath = @"// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][3]/ following-sibling::w:tbl / w:tr /w:tc  [count(. | // w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 2) + "]/preceding-sibling:: w:tbl / w:tr /w:tc )= count(// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 2) + "]/preceding-sibling:: w:tbl / w:tr /w:tc)]";



                if (i == InterfaceServiceExterne.NomsInterfacesServicesExternes(doc, nsmgr).Count&& cmp == MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1))
                {
                    xpath = @"// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][3]/ following-sibling::w:tbl / w:tr /w:tc  [count(. | // w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + 1 + "]/preceding-sibling:: w:tbl / w:tr /w:tc )= count(// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + 1 + "]  /preceding-sibling:: w:tbl / w:tr /w:tc)]";
                }


                if (i < InterfaceServiceExterne.NomsInterfacesServicesExternes(doc, nsmgr).Count&& cmp == MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1) - 1)
                {
                    xpath = @"// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][3]/ following-sibling::w:tbl / w:tr /w:tc  [count(. | // w:p [ w:pPr / w:pStyle [@w:val='Heading1']][5] /preceding-sibling:: w:tbl / w:tr /w:tc )= count(// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][5]  /preceding-sibling:: w:tbl / w:tr /w:tc)]";
                }
                nodeList2 = root.SelectNodes(xpath, nsmgr);

                foreach (XmlNode isbn2 in nodeList2)
                {
                    ListeTypeRetourInterfaceServiceExterne.Add(isbn2.InnerText);
                }
            }
            return(new TypeRetourInterfaceServiceExterne(ListeTypeRetourInterfaceServiceExterne[2], ListeTypeRetourInterfaceServiceExterne[3]));
        }
Example #2
0
        public static List <ParametreInterfaceServiceExterne> ParametresMethodesInterfaceServiceExterne(XmlDocument doc, XmlNamespaceManager nsmgr, int i, int cmp)
        {
            XmlNodeList   nodeList2;
            XmlElement    root = doc.DocumentElement;
            List <string> ListeParametresInterfaceServiceExterne = new List <string>();


            if (MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1) != 0)
            {
                string xpath = @"// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][2]/ following-sibling::w:tbl / w:tr /w:tc  [count(. | // w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][3]/preceding-sibling:: w:tbl / w:tr /w:tc )= count(// w:p [ w:pPr / w:pStyle [@w:val='Heading1']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading2']][4] /following:: w:p [ w:pPr / w:pStyle [@w:val='Heading3']][" + i + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading4']][" + (cmp + 1) + "]/following:: w:p [ w:pPr / w:pStyle [@w:val='Heading5']][3]/preceding-sibling:: w:tbl / w:tr /w:tc)]";


                nodeList2 = root.SelectNodes(xpath, nsmgr);

                foreach (XmlNode isbn2 in nodeList2)
                {
                    ListeParametresInterfaceServiceExterne.Add(isbn2.InnerText);
                }
            }
            if (ListeParametresInterfaceServiceExterne.Count < 6)
            {
                return(null);
            }



            return(ListeAParametresInterfaceServiceExterne(ListeParametresInterfaceServiceExterne));
        }
Example #3
0
        /// <summary>
        /// Retourne la liste des interfaces de services externes du fichier
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="nsmgr"></param>
        /// <returns></returns>
        public static List <InterfaceServiceExterne> InterfacesServicesExternes(XmlDocument doc, XmlNamespaceManager nsmgr)
        {
            List <InterfaceServiceExterne> interfacesRegistresExternes = new List <InterfaceServiceExterne>();
            List <string> noms = NomsInterfacesServicesExternes(doc, nsmgr);


            for (int i = 1; i < NomsInterfacesServicesExternes(doc, nsmgr).Count + 1; i++)
            {
                List <MethodeInterfaceServiceExterne> methodes = MethodeInterfaceServiceExterne.MethodeServicesExternes(doc, nsmgr, i);


                if (MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1) != 0)
                {
                    interfacesRegistresExternes.Add(new InterfaceServiceExterne(noms[i - 1], methodes));
                }

                if (MethodeInterfaceServiceExterne.NombreMethodesInterfaceServiceExterne(doc, nsmgr, i - 1) == 0)
                {
                    interfacesRegistresExternes.Add(new InterfaceServiceExterne(noms[i - 1]));
                }
            }
            return(interfacesRegistresExternes);
        }