-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathICodeColorizer.cs
More file actions
47 lines (43 loc) · 2.25 KB
/
ICodeColorizer.cs
File metadata and controls
47 lines (43 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) Microsoft Corporation. All rights reserved.
using System.IO;
namespace ColorCode
{
/// <summary>
/// Defines the contract for a code colorizer.
/// </summary>
/// <seealso cref="CodeColorizer"/>
public interface ICodeColorizer
{
/// <summary>
/// Colorizes source code using the specified language, the default formatter, and the default style sheet.
/// </summary>
/// <param name="sourceCode">The source code to colorize.</param>
/// <param name="language">The language to use to colorize the source code.</param>
/// <returns>The colorized source code.</returns>
string Colorize(string sourceCode,
ILanguage language);
/// <summary>
/// Colorizes source code using the specified language, the default formatter, and the default style sheet.
/// </summary>
/// <param name="sourceCode">The source code to colorize.</param>
/// <param name="language">The language to use to colorize the source code.</param>
/// <param name="textWriter">The text writer to which the colorized source code will be written.</param>
void Colorize(string sourceCode,
ILanguage language,
TextWriter textWriter);
/// <summary>
/// Colorizes source code using the specified language, formatter, and style sheet.
/// </summary>
/// <param name="sourceCode">The source code to colorize.</param>
/// <param name="language">The language to use to colorize the source code.</param>
/// <param name="textWriter">The text writer to which the colorized source code will be written.</param>
/// <param name="formatter">The formatter to use to colorize the source code.</param>
/// <param name="styleSheet">The style sheet to use to colorize the source code.</param>
/// <param name="textWriter">The text writer to which the colorized source code will be written.</param>
void Colorize(string sourceCode,
ILanguage language,
IFormatter formatter,
IStyleSheet styleSheet,
TextWriter textWriter);
}
}