MetalamaAPI documentationFlashtrace APIFlashtrace.​FormattersFormatter­Repository.​Builder
Open sandboxFocus

FormatterRepository.Builder Class

Inheritance
System.Object
FormatterRepository.Builder
Implements
System.IDisposable
Namespace: Flashtrace.Formatters
Assembly: Flashtrace.Formatters.dll
Syntax
public sealed class Builder : Object

Constructors

Name Description
Builder(FormatterRepository)

Methods

Name Description
AddFormatter(Type, IFormatter)

Registers the given formatter for the given targetType.

AddFormatter(Type, Func<IFormatterRepository, IFormatter>)
AddFormatter(Type, Type)

Registers the given formatterType for the given targetType.

AddFormatter<T>(IFormatter<T>)

Registers the given formatter for the type T.

AddFormatter<T>(Func<IFormatterRepository, IFormatter<T>>)
Dispose()
SetDynamic<T>()

Requests that formatters for parameters of a given type will be resolved according to the type of the parameter value, not to the type of the parameter itself. Interfaces, abstract classes and the System.Object class are always resolved dynamically.