Table of Contents

Class ReportFormat

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

Model used for creating a ReportFragment, which includes the original report fragment template string, a reworked template string suitable for use with Format(string, params object[]) and the placeholder values to be inserted into that format.

public class ReportFormat
Inheritance
ReportFormat
Inherited Members

Constructors

ReportFormat(string, string, IList<NameAndValue>)

Initializes a new instance of ReportFormat.

public ReportFormat(string originalTemplate, string formatTemplate, IList<NameAndValue> values)

Parameters

originalTemplate string

The original template string

formatTemplate string

The reformatted template string

values IList<NameAndValue>

The placeholder values and their names

Exceptions

ArgumentNullException

If any parameter is null.

Properties

FormatTemplate

Gets a reformatted version of OriginalTemplate, which includes only numeric placeholders.

public string FormatTemplate { get; }

Property Value

string

Remarks

This string should be in a format which could be used by Format(string, params object[]).

OriginalTemplate

Gets the original template string, which may include named placeholders.

public string OriginalTemplate { get; }

Property Value

string

Values

Gets a collection of the placeholder values which are to be inserted into the FormatTemplate.

public IReadOnlyList<NameAndValue> Values { get; }

Property Value

IReadOnlyList<NameAndValue>

Remarks

The value's numeric position/index in this collection corresponds to which of the numeric placeholders of FormatTemplate the value should be inserted into. The Name associated with the value may be used to report upon the name of that particular value, preserving that aspect of the OriginalTemplate for informational purposes.