YamlObjectCreationHandlingAttribute 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 YamlObjectCreationHandlingAttribute : YamlAttributeRemarks
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
YamlAttributeYamlObjectCreationHandlingAttribute
Constructors
| Name | Description |
|---|---|
| YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling) | Initializes a new instance of the YamlObjectCreationHandlingAttribute class. |
YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling)
YamlObjectCreationHandlingAttribute.csInitializes a new instance of the YamlObjectCreationHandlingAttribute class.
public YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling handling)Parameters
handlingYamlObjectCreationHandling- The object creation handling to apply.
Properties
| Name | Description |
|---|---|
| Handling | Gets the object creation handling to apply. |
Gets the object creation handling to apply.
public YamlObjectCreationHandling Handling { get; }