Table of Contents

Interface IDataValueDescriptor

Namespace
Acuit.Pinpoint.IO.Testing.Data
Assembly
Acuit.Pinpoint.IO.Testing.Abstractions.dll

A data value descriptor.

public interface IDataValueDescriptor

Properties

Units

Gets the units of measurement, or null if there are none.

string Units { get; }

Property Value

string

Methods

Format(object, string, IFormatProvider)

Formats a data value using the specified format.

string Format(object value, string format, IFormatProvider formatProvider)

Parameters

value object

The value to format.

format string

The format to use (see remarks), or null to use the default display format ("D").

formatProvider IFormatProvider

The provider to use to format the value, or null to obtain the format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

Remarks

The following format values are valid for format:

G - The general format, which is the same as D. D - The display format, which includes the formatted data value along with the units, if it has any. Example: 1,234.5 psi V - The value format, which is the display format without units. Example: 1,234.5 S - The serialization format. Note that formatProvider is ignored (InvariantCulture is always used). Example: 1234.5

Exceptions

FormatException

The format string is not supported.