ICustomFormattingInfo Interface

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

Definition

Namespace: Ookii.FormatC
Assembly: Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.3.2+a0abe9e363271833c90424d1444b43a67fa5858f
C#
public interface ICustomFormattingInfo

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, TextWriter) method (do not throw an exception), in which case the CodeFormatter will fall back to regular regex-based formatting.

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

Methods

FormatCode Formats the specified source code.

See Also