Table of Contents

IniSectionAttribute Class

Definition

Namespace
Bodu.Text.Ini
Assembly
Bodu.Text.Ini.dll
Package
Bodu.Text.Ini 1.0.0
Source
IniSectionAttribute.cs

Marks a partial section POCO for compile-time INI binding: the Bodu.Text.Formats.Generators source generator emits an IIniSectionFactory<TSection> implementation for the type, exposed through a generated static IniFactory property.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
public sealed class IniSectionAttribute : Attribute
Inheritance
IniSectionAttribute
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 key 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 IniSerializer section overloads avoids the reflection binder entirely, making the serialization path trimming- and AOT-safe.

Constructors

IniSectionAttribute()

public IniSectionAttribute()

Applies to

ProductVersions
.NET8, 10