Extensibility point for object formatting managed by RuleBasedFormatter.
Namespace:
Gallio.Runtime.FormattingAssembly: Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public class CustomFormatters |
| Visual Basic (Declaration) |
|---|
Public Class CustomFormatters |
Remarks
Use the methods Register(Type, FormattingFunc) and Unregister(Type) to add and remove custom type formatters.
Examples
The following example registers a custom formatter for a Foo object.
CopyC#
public interface IFoo { int Value { get; } } var customFormatters = new CustomFormatters(); customFormatters.Register<Foo>(x => String.Format("Foo = {0}", x.Value));
Inheritance Hierarchy
System..::.Object
Gallio.Runtime.Formatting..::.CustomFormatters
Gallio.Runtime.Formatting..::.CustomFormatters
