Table of Contents

Class ValueFormatterExtensions

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

Extension methods for IGetsValueFormatter.

public static class ValueFormatterExtensions
Inheritance
ValueFormatterExtensions
Inherited Members

Methods

FormatValue(IGetsValueFormatter, object)

Formats the specified value using an appropriate implementation of IValueFormatter, retrieved from the factory.

public static string FormatValue(this IGetsValueFormatter formatterProvider, object value)

Parameters

formatterProvider IGetsValueFormatter

A value formatter factory

value object

The value to be formatted

Returns

string

The formatted value

Remarks

This extension method is a convenience, equivalent to using GetValueFormatter(object), followed by FormatForReport(object), both using value as the parameter.

Exceptions

ArgumentNullException

If formatterProvider is null.