Table of Contents

Class FormattableFormatter

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

Implementation of IValueFormatter which formats objects that implement IFormattableValue.

public class FormattableFormatter : IValueFormatter
Inheritance
FormattableFormatter
Implements
Inherited Members

Methods

CanFormat(object)

Gets a value indicating whether this object is suitable for formatting the specified value.

public bool CanFormat(object value)

Parameters

value object

The value to be formatted

Returns

bool

true if this formatter is suitable for formatting the specified value; false if not.

FormatForReport(object)

Gets a formatted string which represents the specified value.

public string FormatForReport(object value)

Parameters

value object

The value to be formatted

Returns

string

A formatted string which represents the specified value.

Remarks

Ensure that the value has been tested with CanFormat(object) before executing this method. The behaviour of this method is undefined for any value for which the can-format method does not return true. It may lead to exceptions or garbage output.