Table of Contents

ExtensionDataAttribute Class

Definition

Namespace
Bodu.Text.Serialization
Assembly
Bodu.Text.Serialization.dll
Package
Bodu.Text.Serialization 1.0.0
Source
ExtensionDataAttribute.cs

Designates a property or field that captures dictionary entries which do not map to any other member during deserialization, and whose entries are written back out during serialization.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class ExtensionDataAttribute : SerializationAttribute
Inheritance
ExtensionDataAttribute
Attributes
System.AttributeUsageAttribute
Inherited Members
Extension Methods

Remarks

The member must be a dictionary-shaped type keyed by string - the serializer's object node type, an IDictionary<TKey, TValue>, or a Dictionary<TKey, TValue> whose value is the serializer's node type. A type may declare at most one extension-data member.

On serialization the captured entries are written alongside the type's other members.

Constructors

ExtensionDataAttribute()

Initializes a new instance of the ExtensionDataAttribute class.

public ExtensionDataAttribute()

Applies to

ProductVersions
.NET8, 10