/// <summary>
        /// Add document locale files
        /// </summary>
        /// <param name="files">list of pathes in given locale</param>
        /// <param name="locale">locale of files</param>
        public void AddLocaleFileList(string[] files, LanguageUtil.ELanguage locale)
        {
            foreach (string file in files)
            {
                var sig = Path.GetFileNameWithoutExtension(file);
                Debug.Assert(sig != null, "sig != null");

                DocumentDataItem docItem = null;

                if (_hashtable.ContainsKey(sig))
                {
                    docItem = _hashtable[sig];
                    Debug.Assert(docItem.signature.Equals(sig));
                }
                else
                {
                    docItem = new DocumentDataItem
                    {
                        signature      = sig,
                        baseDocDirPath = baseDocDirPath
                    };
                    _hashtable.Add(sig, docItem);
                    _documentList.Add(docItem);
                }

                docItem.AddLocaleFile(file, locale);
            }
        }
Beispiel #2
0
        public MeaningfulBlock(IDataItem memberData, LanguageUtil.ELanguage language)
        {
            string           memberDoc = null;
            DocumentDataItem docItem   = memberData.GetDocumentDataItem();

            if (docItem != null)
            {
                memberDoc = docItem.LoadDocumentOfLocale(language);
            }

            Init(memberData.GetAssemblyDataItem(), memberDoc);
        }
Beispiel #3
0
        public MeaningfulBlock(IDataItem memberData)
        {
            string           memberDoc = null;
            DocumentDataItem docItem   = memberData.GetDocumentDataItem();

            if (docItem != null)
            {
                memberDoc = docItem.LoadEnglishDocument();
            }

            Init(memberData.GetAssemblyDataItem(), memberDoc);
        }
        /// <summary>
        /// Create DocumentDataItem for corresponding AssemblyDataItem and add it to DocumentDataItemSet
        /// </summary>
        /// <param name="asm"></param>
        public DocumentDataItem CreateDocumentDataItemFor(AssemblyDataItem asm)
        {
            var docItem = new DocumentDataItem
            {
                signature      = asm.SimplifiedName,
                baseDocDirPath = baseDocDirPath
            };

            _hashtable.Add(docItem.signature, docItem);
            _documentList.Add(docItem);
            asm.DocDataItem = docItem;

            return(docItem);
        }
 public void SetDocumentDataItem(DocumentDataItem other)
 {
     //do nothing
 }
 public void SetDocumentDataItem(DocumentDataItem other)
 {
     DocDataItem = other;
 }
 public void SetDocumentDataItem(DocumentDataItem other)
 {
     DocDataItem = other;
 }
        /// <summary>
        /// Create DocumentDataItem for corresponding AssemblyDataItem and add it to DocumentDataItemSet
        /// </summary>
        /// <param name="asm"></param>
        public DocumentDataItem CreateDocumentDataItemFor(AssemblyDataItem asm)
        {
            var docItem = new DocumentDataItem
                          	{
                          		signature = asm.SimplifiedName,
                                baseDocDirPath = baseDocDirPath
                          	};
            _hashtable.Add(docItem.signature, docItem);
            _documentList.Add(docItem);
            asm.DocDataItem = docItem;

            return docItem;
        }
        /// <summary>
        /// Add document locale files
        /// </summary>
        /// <param name="files">list of pathes in given locale</param>
        /// <param name="locale">locale of files</param>
        public void AddLocaleFileList(string[] files, LanguageUtil.ELanguage locale)
        {
            foreach (string file in files)
            {
                var sig = Path.GetFileNameWithoutExtension(file);
                Debug.Assert(sig != null, "sig != null");

                DocumentDataItem docItem = null;

                if (_hashtable.ContainsKey(sig))
                {
                    docItem = _hashtable[sig];
                    Debug.Assert(docItem.signature.Equals(sig));
                }
                else
                {
                    docItem = new DocumentDataItem
                              	{
                              		signature = sig,
                                    baseDocDirPath = baseDocDirPath
                              	};
                    _hashtable.Add(sig, docItem);
                    _documentList.Add(docItem);
                }

                docItem.AddLocaleFile(file, locale);
            }
        }
Beispiel #10
0
 public void SetDocumentDataItem(DocumentDataItem other)
 {
     //do nothing
 }