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 : YamlAttribute

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
YamlAttribute YamlObjectCreationHandlingAttribute

Constructors

NameDescription
YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling)Initializes a new instance of the YamlObjectCreationHandlingAttribute class.

YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling)

YamlObjectCreationHandlingAttribute.cs

Initializes a new instance of the YamlObjectCreationHandlingAttribute class.

public YamlObjectCreationHandlingAttribute(YamlObjectCreationHandling handling)

Parameters

handling YamlObjectCreationHandling
The object creation handling to apply.

Properties

NameDescription
HandlingGets the object creation handling to apply.

Gets the object creation handling to apply.

public YamlObjectCreationHandling Handling { get; }