コード例 #1
0
ファイル: CodeLexer.cs プロジェクト: jonthegiant/StyleCop
        /// <summary>
        /// Initializes a new instance of the CodeLexer class.
        /// </summary>
        /// <param name="languageService">The C# language service.</param>
        /// <param name="source">The source to read.</param>
        /// <param name="codeReader">Used for reading the source code.</param>
        internal CodeLexer(CsLanguageService languageService, Code source, CodeReader codeReader)
        {
            Param.AssertNotNull(languageService, "languageService");
            Param.AssertNotNull(source, "source");
            Param.AssertNotNull(codeReader, "codeReader");

            this.languageService = languageService;
            this.source = source;
            this.codeReader = codeReader;
        }
コード例 #2
0
ファイル: CodeLexer.cs プロジェクト: jonthegiant/StyleCop
        /// <summary>
        /// Initializes a new instance of the CodeLexer class.
        /// </summary>
        /// <param name="languageService">The C# language service.</param>
        /// <param name="source">The source to read.</param>
        /// <param name="codeReader">Used for reading the source code.</param>
        /// <param name="index">The starting absolute index of the code being parsed.</param>
        /// <param name="indexOnLine">The starting index on line of the code being parsed.</param>
        /// <param name="lineNumber">The starting line number of the code being parsed.</param>
        internal CodeLexer(CsLanguageService languageService, Code source, CodeReader codeReader, int index, int indexOnLine, int lineNumber)
        {
            Param.AssertNotNull(languageService, "languageService");
            Param.AssertNotNull(source, "source");
            Param.AssertNotNull(codeReader, "codeReader");
            Param.AssertGreaterThanOrEqualToZero(index, "index");
            Param.AssertGreaterThanOrEqualToZero(indexOnLine, "indexOnLine");
            Param.AssertGreaterThanZero(lineNumber, "lineNumber");

            this.languageService = languageService;
            this.source = source;
            this.codeReader = codeReader;

            this.marker.Index = index;
            this.marker.IndexOnLine = indexOnLine;
            this.marker.LineNumber = lineNumber;
        }