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 : TomlAttributeRemarks
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
TomlAttributeTomlObjectCreationHandlingAttribute
Constructors
| Name | Description |
|---|---|
| TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling) | Initializes a new instance of the TomlObjectCreationHandlingAttribute class. |
TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling)
TomlObjectCreationHandlingAttribute.csInitializes a new instance of the TomlObjectCreationHandlingAttribute class.
public TomlObjectCreationHandlingAttribute(TomlObjectCreationHandling handling)Parameters
handlingTomlObjectCreationHandling- The object creation handling to apply.
Exceptions
ArgumentOutOfRangeExceptionhandlingis not a definedTomlObjectCreationHandling.
Properties
| Name | Description |
|---|---|
| Handling | Gets the object creation handling to apply. |
Gets the object creation handling to apply.
public TomlObjectCreationHandling Handling { get; }