示例#1
0
        private List <wsRevisionControlled> GetDocsToDownload(List <wsRevisionControlled> docList)
        {
            List <wsRevisionControlled> docListFiltered = new List <wsRevisionControlled>();
            List <string> softtypes = XMLConfigParse.getSoftTypes();

            foreach (wsRevisionControlled doc in docList)
            {
                if (softtypes.Contains(doc.softType))
                {
                    docListFiltered.Add(doc);
                }
            }
            return(docListFiltered);
        }
示例#2
0
        public List <WindchillDocInfo> GetDocumentList(string productCode, string productRevision)
        {
            var docInfoList    = new List <WindchillDocInfo>();
            var docList        = GetDocuments(productCode, productRevision);
            var docsToDownload = GetDocsToDownload(docList);

            foreach (var doc in docsToDownload)
            {
                var contentRoles = XMLConfigParse.getContentRoleTypes(doc.softType);
                foreach (var contenRole in contentRoles.Keys)
                {
                    docInfoList.Add(new WindchillDocInfo
                    {
                        SoftType    = doc.softType,
                        Number      = doc.number,
                        Revision    = doc.revision,
                        ContentRole = contenRole,
                        DocType     = contentRoles[contenRole]
                    });
                }
            }
            return(docInfoList);
        }