Specifies the default YamlSerializerOptions used by a source-generated YamlSerializerContext.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class YamlSourceGenerationOptionsAttribute : YamlAttribute
This attribute is inspired by System.Text.Json's JsonSourceGenerationOptionsAttribute, but targets
YamlSerializerOptions instead.
The SharpYaml source generator reads this attribute at compile time and emits a context that constructs an immutable YamlSerializerOptions instance. The generated context expects the same options instance to be used consistently at runtime.
kind:method, kind:property, kind:ctor. Press Esc to clear.ConvertersGets or sets converter types to be instantiated and registered on the generated options instance.DefaultIgnoreConditionGets or sets the default ignore condition for null/default values.DictionaryKeyPolicyGets or sets the policy used to convert dictionary keys during serialization.DiscriminatorStyleGets or sets how type discriminators are represented during polymorphic serialization.DuplicateKeyHandlingGets or sets behavior when duplicate mapping keys are encountered while reading.IndentSizeGets or sets the number of spaces to use when WriteIndented is enabled.MappingOrderGets or sets member ordering behavior for emitted mappings.PreferPlainStyleGets or sets a value indicating whether plain scalar style should be preferred when possible.PreferQuotedForAmbiguousScalarsGets or sets a value indicating whether quoted scalar style should be preferred for ambiguous scalars.PreferredObjectCreationHandlingGets or sets the preferred object creation handling for members during deserialization.PropertyNameCaseInsensitiveGets or sets a value indicating whether property name matching is case-insensitive.PropertyNamingPolicyGets or sets the policy used to convert CLR property names.ReferenceHandlingGets or sets object reference handling behavior.SchemaGets or sets the schema used for scalar resolution.SourceNameGets or sets an optional name for the YAML source.TypeDiscriminatorPropertyNameGets or sets the property name used for discriminator-based polymorphism.UnknownDerivedTypeHandlingGets or sets behavior when an unknown derived type discriminator is encountered.UnmappedMemberHandlingGets or sets how unmapped YAML members are handled during object deserialization.UnsafeAllowDeserializeFromTagTypeNameGets or sets a value indicating whether unregistered runtime type names from YAML tags are allowed during deserialization.UseSchemaGets or sets a value indicating whether scalar deserialization should resolve through Schema.WriteIndentedGets or sets a value indicating whether emitted YAML should be indented.