ReadLine() public method

public ReadLine ( ) : string
return string
コード例 #1
0
ファイル: Script.cs プロジェクト: manpl/nppsharp
        /// <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);
        }
コード例 #2
0
ファイル: Script.cs プロジェクト: cmrazek/NppSharp
        /// <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;
        }