CodeFormatter ClassFormatC Syntax Highlighting Class Library
Provides source code syntax highlighting functionality.
Inheritance Hierarchy

OnlineSystem Object
  Ookii.FormatC CodeFormatter

Namespace: Ookii.FormatC
Assembly: Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public class CodeFormatter
Remarks

The CodeFormatter class will format source code based on the information provided by an implementation of the IFormattingInfo interface.

The result will be HTML source code that will display the formatted source code when combined with the appropriate style sheet.

Examples

The following code sample shows how to use the CodeFormatter class to format C# source code.

CodeFormatter formatter = new CodeFormatter();
formatter.FormattingInfo = new CSharpFormattingInfo();
string formattedHtml = formatter.FormatCode(System.IO.File.ReadAllText("MySourceFile.cs"));
Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
See Also