Table of Contents

DelimitedRecordAttribute Class

Definition

Namespace
Bodu.Text.Delimited
Assembly
Bodu.Text.Delimited.dll
Package
Bodu.Text.Delimited 1.0.0
Source
DelimitedRecordAttribute.cs

Marks a partial record POCO for compile-time delimited binding: the Bodu.Text.Formats.Generators source generator emits an IDelimitedRecordFactory<TRecord> implementation for the type, exposed through a generated static DelimitedFactory property.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class DelimitedRecordAttribute : Attribute
Inheritance
DelimitedRecordAttribute
Attributes
System.AttributeUsageAttribute
Inherited Members
Extension Methods

Remarks

The generated factory maps the type's public read/write instance properties in declaration order, honouring PropertyNameAttribute for column names and skipping members annotated with IgnoreAttribute. Scalar values convert with the invariant culture.

The annotated type must be declared partial so the generator can add the factory to it. Passing the generated factory to the DelimitedSerializer factory overloads avoids the reflection binder entirely, making the serialization path trimming- and AOT-safe.

Constructors

DelimitedRecordAttribute()

public DelimitedRecordAttribute()

Applies to

ProductVersions
.NET8, 10