TomlObjectCreationHandlingAttribute Class

Determines how deserialization handles an existing instance for the annotated member or type.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class TomlObjectCreationHandlingAttribute : TomlAttribute

Remarks

When applied to a type, it sets the default handling for all members declared on that type. When applied to a member, it overrides the type-level and serializer-level handling for that member.

Inheritance
TomlAttribute TomlObjectCreationHandlingAttribute

Constructors

NameDescription
TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling)Initializes a new instance of the TomlObjectCreationHandlingAttribute class.

TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling)

TomlObjectCreationHandlingAttribute.cs

Initializes a new instance of the TomlObjectCreationHandlingAttribute class.

public TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling handling)

Parameters

handling TomlObjectCreationHandling
The object creation handling to apply.

Exceptions

ArgumentOutOfRangeException
handling is not a defined TomlObjectCreationHandling.

Properties

NameDescription
HandlingGets the object creation handling to apply.

Gets the object creation handling to apply.

public TomlObjectCreationHandling Handling { get; }