Click or drag to resize

ICustomFormattingInfo Interface

Interface for classes that provide custom, not regex-based formatting.

Namespace:  Ookii.FormatC
Assembly:  Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.1.0
Syntax
public interface ICustomFormattingInfo

The ICustomFormattingInfo type exposes the following members.

Methods
  NameDescription
Public methodFormatCode
Formats the specified source code.
Top
Remarks

Implement this interface in addition to IFormattingInfo if you can do custom formatting, e.g. using a parser.

If it's possible for parsing to fail (keep in mind that code formatters might be asked to process incomplete fragments of code), make sure you return from the FormatCode(String) method (do not throw an exception), in which case the CodeFormatter will fall back to regular regex-based formatting.

If your FormatCode(String) method does not return , the members of IFormattingInfo will not be used.

See Also