/// <summary>
        /// ReloadAllProjectData
        /// </summary>
        public void ReloadAllProjectData()
        {
            asmset = AssemblyDataBuilder.BuildAssemblyDataItemsMonoCecil(asmLocation);
            docSet = DocumentDataBuilder.BuildDocumentDataItems(docPath);

            asmset.Bind(docSet);
            PopulateAllItems(asmset, docSet);
        }
        public static DocumentDataItemSet BuildDocumentDataItems()
        {
            var docDirectoryPath = DirectoryUtil.MemberDocsDirFullPath;
            var docset = new DocumentDataItemSet {baseDocDirPath = docDirectoryPath};

            foreach (var loc in LanguageUtil.GetAllLanguages())
            {
                CreateLocaleDirectory(docDirectoryPath, loc);

                var files = GetDocumentPathListOf(docDirectoryPath, loc);
                docset.AddLocaleFileList(files, loc);
            }

            return docset;
        }
        private void PopulateAllItems(AssemblyDataItemSet asmSet, DocumentDataItemSet docSet)
        {
            var apiMissingList = docSet.GetAPIMissingDocumentDataItems();             //documents with no APIs => shouldn't really happen.

            _allItems.Clear();
            _allItems.AddRange(asmSet.Items.ToArray());

            var lst = apiMissingList.ToList();

            _allItems.AddRange(lst.ToArray());

            Console.WriteLine("|docSet| = {1}; |asmSet| = {0}; |apiMissingList| = {2}; |allItems| = {3}", asmSet.Items.Count,
                              docSet._documentList.Count, lst.Count, _allItems.Count);

            Debug.Assert(_allItems.Count == lst.Count + asmSet.Items.Count);
        }
Esempio n. 4
0
        public static DocumentDataItemSet BuildDocumentDataItems(String docDirectoryPath)
        {
            var docset = new DocumentDataItemSet {
                baseDocDirPath = docDirectoryPath
            };

            foreach (var loc in LanguageUtil.GetAllLanguages())
            {
                CreateLocaleDirectory(docDirectoryPath, loc);

                var files = GetDocumentPathListOf(docDirectoryPath, loc);
                docset.AddLocaleFileList(files, loc);
            }

            return(docset);
        }
Esempio n. 5
0
        /// <summary>
        /// Bind givend DocumentDataItemSet to this AssemblyDataItemSet.
        /// By This process, AssemblyDataItems are matched up with its documents.
        /// </summary>
        /// <param name="documentItemSet"></param>
        internal void Bind(DocumentDataItemSet documentItemSet)
        {
            Debug.Assert(documentItemSet != null);

            _documentItemSet = documentItemSet;

            foreach (var item in Items)
            {
                // if matching document is there, _documentItemSet should return valid docitemdata
                var docItem = _documentItemSet.FindByName(item.SimplifiedName);
                item.DocDataItem = docItem;
                if (docItem != null)
                {
                    docItem.asm = item;
                }
            }
        }
        /// <summary>
        /// Bind givend DocumentDataItemSet to this AssemblyDataItemSet.
        /// By This process, AssemblyDataItems are matched up with its documents.
        /// </summary>
        /// <param name="documentItemSet"></param>
        internal void Bind(DocumentDataItemSet documentItemSet)
        {
            Debug.Assert(documentItemSet != null);

            _documentItemSet = documentItemSet;

            foreach (var item in Items)
            {
                // if matching document is there, _documentItemSet should return valid docitemdata
                var docItem = _documentItemSet.FindByName(item.SimplifiedName);
                item.DocDataItem = docItem;
                if (docItem != null)
                    docItem.asm = item;
            }
        }
        private void PopulateAllItems(AssemblyDataItemSet asmSet, DocumentDataItemSet docSet)
        {
            var apiMissingList = docSet.GetAPIMissingDocumentDataItems(); //documents with no APIs => shouldn't really happen.

            _allItems.Clear();
            _allItems.AddRange(asmSet.Items.ToArray());

            var lst = apiMissingList.ToList();
            _allItems.AddRange(lst.ToArray());

            Console.WriteLine("|docSet| = {1}; |asmSet| = {0}; |apiMissingList| = {2}; |allItems| = {3}", asmSet.Items.Count,
                              docSet._documentList.Count, lst.Count, _allItems.Count);

            Debug.Assert(_allItems.Count == lst.Count + asmSet.Items.Count);
        }
        /// <summary>
        /// ReloadAllProjectData
        /// </summary>
        public void ReloadAllProjectData()
        {
            asmset = AssemblyDataBuilder.BuildAssemblyDataItemsMonoCecil();
            docSet = DocumentDataBuilder.BuildDocumentDataItems();

            asmset.Bind(docSet);
            PopulateAllItems(asmset, docSet);
        }