PageRenderTime 39ms CodeModel.GetById 17ms 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
Possible License(s): GPL-2.0
  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. using System;
  6. using System.Collections.Generic;
  7. using System.Text;
  8. using NUnit.UiException.CodeFormatters;
  9. namespace NUnit.UiException.CodeFormatters
  10. {
  11. /// <summary>
  12. /// ICodeFormatter is the interface to make the syntax
  13. /// coloring of a string for a specific developpment language.
  14. /// </summary>
  15. public interface ICodeFormatter
  16. {
  17. /// <summary>
  18. /// The language name handled by this formatter.
  19. /// Ex: "C#", "Java", "C++" and so on...
  20. /// </summary>
  21. string Language { get; }
  22. /// <summary>
  23. /// Makes the coloring syntax of the given text.
  24. /// </summary>
  25. /// <param name="code">The text to be formatted. This
  26. /// parameter cannot be null.</param>
  27. /// <returns>A FormattedCode instance.</returns>
  28. FormattedCode Format(string code);
  29. }
  30. }