Class CsvDataFormat

Assembly: redb.Route.DataFormats.Csv.dll

CSV (CsvHelper). Marshals POCO collections (header from property
names), dictionaries (header from keys), raw rows (string[] / object[], no header) or a
single POCO; unmarshals to List<T> / T[] / IEnumerable<T>, to
List<Dictionary<string,string>> (with header) or List<string[]> (without),
or to a single T. Errors name the format.

public sealed class CsvDataFormat : IMessageSerializer

Inheritance

Object→CsvDataFormat

Implements

Properties

ContentType

Content type this serializer handles (e.g., "application/json").

public string ContentType { get; }

MediaTypes

All media types this serializer can handle, including structured-suffix aliases

public IReadOnlyCollection<string> MediaTypes { get; }

Options

The options in effect.

public CsvDataFormatOptions Options { get; }

Methods

Deserialize(byte[], Type)

Deserializes a byte array to a typed value.

public object? Deserialize(byte[] data, Type type)

Deserialize<T>(byte[])

Deserializes a byte array to a typed value.

public T? Deserialize<T>(byte[] data)

Serialize<T>(T)

Serializes a value to a byte array.

public byte[] Serialize<T>(T value)

Constructors

CsvDataFormat(CsvDataFormatOptions?)

Creates the format with the given options (defaults when null).