Table of Contents

Interface IFormatterRegistry

Namespace
CSF.Screenplay.Reporting
Assembly
CSF.Screenplay.Abstractions.dll

A registry of the concrete types of IValueFormatter which are available for use by the Screenplay reporting functionality.

public interface IFormatterRegistry : IList<Type>, ICollection<Type>, IEnumerable<Type>, IEnumerable
Inherited Members

Remarks

Formatter types stored within this registry will be selected for use in the reverse order in which they appear in the collection. When selecting a formatter for a particular object/value, this collection will be iterated starting at the end, moving toward the beginning. This means that (presuming new formatter types are added using Add(T)), types which are added later will be used with precedence over those which are added earlier. This is the mechanism which is used as a tie-breaker if two or more IValueFormatter types would both return true from CanFormat(object).

Developers might want to add a IValueFormatter type to this collection, which is to have a lower precedence than another which has already been added, when they are both able to format the same value. In that scenario, use Insert(int, T) to explicitly add the formatter at a lower index (closer to the start of the collection).