Interface IGetsValueFormatter
- Namespace
- CSF.Screenplay.Reporting
- Assembly
- CSF.Screenplay.Abstractions.dll
An object which can select the most appropriate implementation of IValueFormatter from a IFormatterRegistry.
public interface IGetsValueFormatter
- Extension Methods
Methods
GetValueFormatter(object)
Selects and returns an IValueFormatter which is most appropriate to the specified value
.
IValueFormatter GetValueFormatter(object value)
Parameters
value
objectThe value to be formatted
Returns
- IValueFormatter
A value formatter
Remarks
See the remarks for IFormatterRegistry for more information about the algorithm by which an appropriate formatter is selected.
It should be very rare for this method to raise an exception; as implementations of this type should come pre-loaded with fallback formatters which may format any value. Exceptions might only be expected if a developer removes these default formatters and does not replace them with suitable implementaton types that can cover all scenarios.
Exceptions
- InvalidOperationException
If no appropriate formatter could be selected