Exemplo n.º 1
0
        /// <summary>
        /// Main Method, processes input current file content
        /// </summary>
        /// <param name="textLines"></param>
        /// <param name="inputLines">The content of the </param>
        public static void ProcessCurrentFile(IVsTextLines textLines, string[] inputLines)
        {
            int addedLines = 0;

            for (int i = 0; i < inputLines.Length; i++)
            {
                // Check property
                string propertyName = LineContainsPropertyWithoutDataMember(inputLines, i);
                if (propertyName != null)
                {
                    int           identation     = inputLines[i].GetLineIdentation();
                    string        dataMemberLine = GenerateDataMember(propertyName, identation);
                    List <string> xmlComments    = GetXmlComment(propertyName, identation);

                    xmlComments.Add(dataMemberLine);

                    textLines.AddLines(i + addedLines, xmlComments.ToArray());
                    addedLines += xmlComments.Count;
                    continue;
                }


                string dataMember = LineContainsDataMemberWithoutSummary(inputLines, i);
                if (dataMember != null)
                {
                    int           identation  = inputLines[i].GetLineIdentation();
                    List <string> xmlComments = GetXmlComment(dataMember, identation);

                    textLines.AddLines(i + addedLines, xmlComments.ToArray());
                    addedLines += xmlComments.Count;
                    continue;
                }
            }
        }