Zum Hauptinhalt springen

CsvColumn

Namespace: Meshmakers.Octo.MeshAdapter.Nodes.Transform

One output column: a value read from the record, a constant, or an empty column.

public record CsvColumn : IEquatable<CsvColumn>

Inheritance Object → CsvColumn
Implements IEquatable<CsvColumn>

Properties​

Text of the header cell. Defaults to the last name of CsvColumn.ValuePath.

public string Header { get; set; }

Property Value​

String

ValuePath​

JSONPath relative to the record. Mutually exclusive with CsvColumn.Value.

public string ValuePath { get; set; }

Property Value​

String

Value​

Constant text written in every row. Mutually exclusive with CsvColumn.ValuePath.

public string Value { get; set; }

Property Value​

String

DataType​

How the value is read and written; CsvValueType.Auto when unset.

public Nullable<CsvValueType> DataType { get; set; }

Property Value​

Nullable<CsvValueType>

Format​

.NET format string. For a number a custom or standard numeric format (0.###, 0.000, F2), for a date a custom or standard date format (dd.MM.yyyy HH:mm). Applied with the culture of the column or node (invariant when none is set, so the decimal separator is a point).

public string Format { get; set; }

Property Value​

String

Culture​

Culture the cell is written in (for example de-AT for a decimal comma and German day and month names). Unset takes the culture of the node; an empty string forces the invariant culture (decimal point) for this column. A value read from a string is always read invariant, whatever the output culture is.

public string Culture { get; set; }

Property Value​

String

Decimals​

Number of decimals a number is rounded to, half away from zero, before it is formatted. Unset leaves the value as it is.

public Nullable<int> Decimals { get; set; }

Property Value​

Nullable<Int32>

Factor​

Factor a number is multiplied with before it is rounded and formatted (unit conversion, e.g. 4 to turn the energy of a quarter hour into power). Unset is 1.

public Nullable<decimal> Factor { get; set; }

Property Value​

Nullable<Decimal>

TimeZone​

IANA id of the time zone a date is converted into before it is formatted (for example Europe/Vienna). Unset is UTC.

public string TimeZone { get; set; }

Property Value​

String

Required​

When set, an empty rendered value fails the node instead of writing an empty cell.

public bool Required { get; set; }

Property Value​

Boolean

Constructors​

CsvColumn()​

public CsvColumn()