PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/NUnit/UiException/ITextManager.cs

#
C# | 42 lines | 13 code | 5 blank | 24 comment | 0 complexity | 553220396a90224d0edb22480b8adbe0 MD5 | raw file
 1// ****************************************************************
 2// This is free software licensed under the NUnit license. You may
 3// obtain a copy of the license at http://nunit.org
 4// ****************************************************************
 5
 6using System;
 7using System.Collections.Generic;
 8using System.Text;
 9
10namespace NUnit.UiException
11{
12    /// <summary>
13    /// Provides an abstract way to manipulate a text as a whole and as separate
14    /// sequences that can randomly be accessed one line at a time.
15    /// </summary>
16    public interface ITextManager
17    {
18        /// <summary>
19        /// Gets the number of line in text managed by this object.
20        /// </summary>
21        int LineCount { get; }
22
23        /// <summary>
24        /// Gets the character count of the longest line in the text managed
25        /// by this object.
26        /// </summary>
27        int MaxLength { get; }
28
29        /// <summary>
30        /// Gets the complete text managed by this object.
31        /// </summary>
32        string Text { get; }
33
34        /// <summary>
35        /// Gets a string filled with all characters in the line
36        /// at the specified startingPosition without the trailing '\r\n' characters.
37        /// </summary>
38        /// <param name="lineIndex"></param>
39        /// <returns></returns>
40        string GetTextAt(int lineIndex);
41    }
42}