YamlSourceGenerationOptionsAttribute class

Specifies compile-time source generator configuration when applied to YamlSerializerContext class declarations.

Namespace: System.Text.Yaml.Serialization ยท Assembly: Styml.dll

public sealed class YamlSourceGenerationOptionsAttribute : YamlAttribute

Inheritance: object โ†’ Attribute โ†’ YamlAttribute โ†’ YamlSourceGenerationOptionsAttribute

Specifies compile-time source generator configuration when applied to YamlSerializerContext class declarations.

ConstructorsLink to this heading

Constructs a new YamlSourceGenerationOptionsAttribute instance.

public YamlSourceGenerationOptionsAttribute();

Constructs a new YamlSourceGenerationOptionsAttribute instance with a predefined set of options determined by the specified YamlSerializerDefaults.

public YamlSourceGenerationOptionsAttribute(YamlSerializerDefaults defaults);

Parameters

Exception Condition
ArgumentOutOfRangeException Invalid defaults parameter.

PropertiesLink to this heading

AcceptLenientScalarsLink to this heading

Specifies the default value of YamlSerializerOptions.AcceptLenientScalars when set.

public bool AcceptLenientScalars { get; set; }

AllowDuplicatePropertiesLink to this heading

Specifies the default value of YamlSerializerOptions.AllowDuplicateProperties when set.

public bool AllowDuplicateProperties { get; set; }

AllowOutOfOrderMetadataPropertiesLink to this heading

Specifies the default value of YamlSerializerOptions.AllowOutOfOrderMetadataProperties when set.

public bool AllowOutOfOrderMetadataProperties { get; set; }

AllowTrailingCommasLink to this heading

Specifies the default value of YamlSerializerOptions.AllowTrailingCommas when set.

public bool AllowTrailingCommas { get; set; }

ConvertersLink to this heading

Specifies the default value of YamlSerializerOptions.Converters when set.

public Type[]? Converters { get; set; }

DefaultBufferSizeLink to this heading

Specifies the default value of YamlSerializerOptions.DefaultBufferSize when set.

public int DefaultBufferSize { get; set; }

DefaultIgnoreConditionLink to this heading

Specifies the default value of YamlSerializerOptions.DefaultIgnoreCondition when set.

public YamlIgnoreCondition DefaultIgnoreCondition { get; set; }

DefaultScalarStyleLink to this heading

Specifies the default value of YamlSerializerOptions.DefaultScalarStyle when set.

public YamlScalarStyle DefaultScalarStyle { get; set; }

DictionaryKeyPolicyLink to this heading

Specifies the default value of YamlSerializerOptions.DictionaryKeyPolicy when set.

public YamlKnownNamingPolicy DictionaryKeyPolicy { get; set; }

DisallowImplicitCollectionKeysLink to this heading

Specifies the default value of YamlSerializerOptions.DisallowImplicitCollectionKeys when set.

public bool DisallowImplicitCollectionKeys { get; set; }

DuplicateKeyHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.DuplicateKeyHandling when set. When YamlSourceGenerationOptionsAttribute.AllowDuplicateProperties is set too, this property wins.

public YamlDuplicateKeyHandling DuplicateKeyHandling { get; set; }

ExpandSequenceItemsLink to this heading

Specifies the default value of YamlSerializerOptions.ExpandSequenceItems when set.

public bool ExpandSequenceItems { get; set; }

GenerationModeLink to this heading

Specifies the default source generation mode for type declarations that don't set a YamlSerializableAttribute.GenerationMode.

public YamlSourceGenerationMode GenerationMode { get; set; }

IgnoreReadOnlyFieldsLink to this heading

Specifies the default value of YamlSerializerOptions.IgnoreReadOnlyFields when set.

public bool IgnoreReadOnlyFields { get; set; }

IgnoreReadOnlyPropertiesLink to this heading

Specifies the default value of YamlSerializerOptions.IgnoreReadOnlyProperties when set.

public bool IgnoreReadOnlyProperties { get; set; }

IgnoreSourceStylesLink to this heading

Specifies the default value of YamlSerializerOptions.IgnoreSourceStyles when set.

public bool IgnoreSourceStyles { get; set; }

IncludeFieldsLink to this heading

Specifies the default value of YamlSerializerOptions.IncludeFields when set.

public bool IncludeFields { get; set; }

IndentCharacterLink to this heading

Specifies the default value of YamlSerializerOptions.IndentCharacter when set.

public char IndentCharacter { get; set; }

IndentSequencesLink to this heading

Specifies the default value of YamlSerializerOptions.IndentSequences when set.

public bool IndentSequences { get; set; }

IndentSizeLink to this heading

Specifies the default value of YamlSerializerOptions.IndentCharacter when set.

public int IndentSize { get; set; }

InferClosedTypePolymorphismLink to this heading

Specifies the default value of YamlSerializerOptions.InferClosedTypePolymorphism when set.

public bool InferClosedTypePolymorphism { get; set; }

If a type declares one or more YamlDerivedTypeAttribute registrations, inference is skipped for that type and only the explicitly registered derived types are used. Polymorphism configuration declared on derived types applies to their respective contracts and does not affect inference for the base type. Closed derived types are expanded recursively and only terminal derived types are registered.

MappingOrderLink to this heading

Specifies the default value of YamlSerializerOptions.MappingOrder when set. YamlMappingOrder.Sorted also sorts the generated members of the fast path.

public YamlMappingOrder MappingOrder { get; set; }

MaxAliasExpansionLink to this heading

Specifies the default value of YamlSerializerOptions.MaxAliasExpansion when set.

public int MaxAliasExpansion { get; set; }

MaxDepthLink to this heading

Specifies the default value of YamlSerializerOptions.MaxDepth when set.

public int MaxDepth { get; set; }

MaxLineWidthLink to this heading

Specifies the default value of YamlSerializerOptions.MaxLineWidth when set.

public int MaxLineWidth { get; set; }

MultiLineStringStyleLink to this heading

Specifies the default value of YamlSerializerOptions.MultiLineStringStyle when set.

public YamlScalarStyle MultiLineStringStyle { get; set; }

NewLineLink to this heading

Specifies the default value of YamlSerializerOptions.NewLine when set.

public string? NewLine { get; set; }

NumberHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.NumberHandling when set.

public YamlNumberHandling NumberHandling { get; set; }

PreferredObjectCreationHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.PreferredObjectCreationHandling when set.

public YamlObjectCreationHandling PreferredObjectCreationHandling { get; set; }

PropertyNameCaseInsensitiveLink to this heading

Specifies the default value of YamlSerializerOptions.PropertyNameCaseInsensitive when set.

public bool PropertyNameCaseInsensitive { get; set; }

PropertyNamingPolicyLink to this heading

Specifies the default value of YamlSerializerOptions.PropertyNamingPolicy when set.

public YamlKnownNamingPolicy PropertyNamingPolicy { get; set; }

QuoteForLenientReadersLink to this heading

Specifies the default value of YamlSerializerOptions.QuoteForLenientReaders when set.

public bool QuoteForLenientReaders { get; set; }

ReadCommentHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.ReadCommentHandling when set.

public YamlCommentHandling ReadCommentHandling { get; set; }

ReferenceHandlerLink to this heading

Specifies the default value of YamlSerializerOptions.ReferenceHandler when set.

public YamlKnownReferenceHandler ReferenceHandler { get; set; }

ResolveMergeKeysLink to this heading

Specifies the default value of YamlSerializerOptions.ResolveMergeKeys when set.

public bool ResolveMergeKeys { get; set; }

RespectNullableAnnotationsLink to this heading

Specifies the default value of YamlSerializerOptions.RespectNullableAnnotations when set.

public bool RespectNullableAnnotations { get; set; }

RespectRequiredConstructorParametersLink to this heading

Specifies the default value of YamlSerializerOptions.RespectRequiredConstructorParameters when set.

public bool RespectRequiredConstructorParameters { get; set; }

SchemaLink to this heading

Specifies the default value of YamlSerializerOptions.Schema when set.

public YamlSchemaKind Schema { get; set; }

TypeClassifiersLink to this heading

Specifies the default value of YamlSerializerOptions.TypeClassifiers when set.

public Type[]? TypeClassifiers { get; set; }

UnknownTypeHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.UnknownTypeHandling when set.

public YamlUnknownTypeHandling UnknownTypeHandling { get; set; }

UnmappedMemberHandlingLink to this heading

Specifies the default value of YamlSerializerOptions.UnmappedMemberHandling when set.

public YamlUnmappedMemberHandling UnmappedMemberHandling { get; set; }

UseStringEnumConverterLink to this heading

Instructs the source generator to default to YamlStringEnumConverter instead of numeric serialization for all enum types encountered in its type graph.

public bool UseStringEnumConverter { get; set; }

WriteIndentedLink to this heading

Specifies the default value of YamlSerializerOptions.WriteIndented when set.

public bool WriteIndented { get; set; }

WriteStyleLink to this heading

Specifies the default value of YamlSerializerOptions.WriteStyle when set.

public YamlWriterStyle WriteStyle { get; set; }

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close