ReadLine() public method

public ReadLine ( ) : string
return string
Beispiel #1
0
        /// <summary>
        /// Examines a source code file, looking for references in the comments at the top.
        /// </summary>
        /// <param name="cp">A CodeParser object used to parse the text.</param>
        /// <returns>True if successful; otherwise false.</returns>
        private bool ProcessSource(CodeParser cp)
        {
            Regex  rxRef = new Regex(@"^//\s*\#ref(erence)?\:\s*(.+)$");
            Match  match;
            string line;

            while (!cp.EndOfFile)
            {
                line = cp.ReadLine().Trim();

                if (!string.IsNullOrEmpty(line))
                {
                    if ((match = rxRef.Match(line)).Success)
                    {
                        _references.Add(match.Groups[2].Value);
                    }
                    else if (!line.StartsWith("//"))
                    {
                        break;
                    }
                }
            }

            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// Examines a source code file, looking for references in the comments at the top.
        /// </summary>
        /// <param name="cp">A CodeParser object used to parse the text.</param>
        /// <returns>True if successful; otherwise false.</returns>
        private bool ProcessSource(CodeParser cp)
        {
            Regex rxRef = new Regex(@"^//\s*\#ref(erence)?\:\s*(.+)$");
            Match match;
            string line;

            while (!cp.EndOfFile)
            {
                line = cp.ReadLine().Trim();

                if (!string.IsNullOrEmpty(line))
                {
                    if ((match = rxRef.Match(line)).Success)
                    {
                        _references.Add(match.Groups[2].Value);
                    }
                    else if (!line.StartsWith("//")) break;
                }
            }

            return true;
        }