PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/NUnit/UiException/CodeFormatters/ICodeFormatter.cs

#
C# | 33 lines | 12 code | 3 blank | 18 comment | 0 complexity | 39c10350f7c22c0839be4188a25f5a1a 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;
 9using NUnit.UiException.CodeFormatters;
10
11namespace NUnit.UiException.CodeFormatters
12{
13    /// <summary>
14    /// ICodeFormatter is the interface to make the syntax
15    /// coloring of a string for a specific developpment language.
16    /// </summary>
17    public interface ICodeFormatter
18    {
19        /// <summary>
20        /// The language name handled by this formatter.
21        /// Ex: "C#", "Java", "C++" and so on...
22        /// </summary>
23        string Language { get; }
24
25        /// <summary>
26        /// Makes the coloring syntax of the given text.
27        /// </summary>
28        /// <param name="code">The text to be formatted. This
29        /// parameter cannot be null.</param>
30        /// <returns>A FormattedCode instance.</returns>
31        FormattedCode Format(string code);
32    }
33}