ObjectCreationHandling Enum
Definition
- Namespace
- Bodu.Text.Serialization
- Assembly
- Bodu.Text.Serialization.dll
- Package
- Bodu.Text.Serialization 1.0.0
Specifies whether the serializer replaces a member's value with a freshly created instance or populates the value already held by the member during deserialization.
public enum ObjectCreationHandling
- Extension Methods
Fields
Replace = 0A new instance is created and assigned to the member.
Populate = 1The instance already held by the member is reused and populated with the read entries.
Remarks
Populate applies to collection and dictionary members: the entries read from the input are added into the existing instance, so a get-only collection property initialized in the type can round-trip. When the existing value is null or the member is not a populatable collection, the serializer falls back to replacing the value.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |