TomlSourceGenerationOptionsAttribute Class
Specifies default source generation options for a TomlSerializerContext.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class TomlSourceGenerationOptionsAttribute : TomlAttribute- Inheritance
TomlAttributeTomlSourceGenerationOptionsAttribute
Constructors
| Name | Description |
|---|---|
| TomlSourceGenerationOptionsAttribute() |
TomlSourceGenerationOptionsAttribute()
public TomlSourceGenerationOptionsAttribute()No documentation is available.
Properties
| Name | Description |
|---|---|
| Converters | Gets or sets converter types to register on the generated context. |
| DefaultIgnoreCondition | Gets or sets the default ignore condition for null/default values. |
| DictionaryKeyPolicy | Gets or sets the policy used to convert dictionary keys during serialization. |
| DottedKeyHandling | Gets or sets behavior for dictionary keys containing '.'. |
| DuplicateKeyHandling | Gets or sets behavior when duplicate keys are encountered while reading. |
| IgnoreReadOnlyFields | Gets or sets a value indicating whether read-only fields are ignored during serialization. |
| IgnoreReadOnlyProperties | Gets or sets a value indicating whether read-only properties are ignored during serialization. |
| IncludeFields | Gets or sets a value indicating whether public fields are included during serialization and deserialization. |
| IndentSize | Gets or sets the number of spaces to use when indentation is enabled. |
| InlineTablePolicy | Gets or sets inline table emission policy. |
| MappingOrder | Gets or sets member ordering behavior for emitted mappings. |
| MaxDepth | Gets or sets the maximum depth allowed when reading or writing nested TOML containers. |
| NewLine | Gets or sets the newline kind used by the writer. |
| PreferredObjectCreationHandling | Gets or sets the preferred object creation handling when deserializing object and collection members. |
| PropertyNameCaseInsensitive | Gets or sets a value indicating whether property name matching is case-insensitive. |
| PropertyNamingPolicy | Gets or sets the policy used to convert CLR property names. |
| RespectNullableAnnotations | Gets or sets a value indicating whether nullable annotations are enforced during serialization and deserialization. |
| RespectRequiredConstructorParameters | Gets or sets a value indicating whether required constructor parameters must be present during deserialization. |
| RootValueHandling | Gets or sets behavior for scalar/array roots that do not naturally map to a TOML document. |
| RootValueKeyName | Gets or sets the root key name used when wrapping a scalar/array root. |
| TableArrayStyle | Gets or sets array-of-table emission style. |
| UnmappedMemberHandling | Gets or sets how unmapped TOML keys are handled during object deserialization. |
| WriteIndented | Gets or sets a value indicating whether output should be indented. |
Converters
TomlSourceGenerationOptionsAttribute.csGets or sets converter types to register on the generated context.
public Type[]? Converters { get; set; }Property value
Type[]?
Remarks
Converter types must have a public parameterless constructor.
DefaultIgnoreCondition
TomlSourceGenerationOptionsAttribute.csGets or sets the default ignore condition for null/default values.
public TomlIgnoreCondition DefaultIgnoreCondition { get; set; }Property value
DictionaryKeyPolicy
TomlSourceGenerationOptionsAttribute.csGets or sets the policy used to convert dictionary keys during serialization.
public TomlKnownNamingPolicy DictionaryKeyPolicy { get; set; }Property value
DottedKeyHandling
TomlSourceGenerationOptionsAttribute.csGets or sets behavior for dictionary keys containing '.'.
public TomlDottedKeyHandling DottedKeyHandling { get; set; }Property value
DuplicateKeyHandling
TomlSourceGenerationOptionsAttribute.csGets or sets behavior when duplicate keys are encountered while reading.
public TomlDuplicateKeyHandling DuplicateKeyHandling { get; set; }Property value
IgnoreReadOnlyFields
TomlSourceGenerationOptionsAttribute.csIgnoreReadOnlyProperties
TomlSourceGenerationOptionsAttribute.csIncludeFields
TomlSourceGenerationOptionsAttribute.csIndentSize
TomlSourceGenerationOptionsAttribute.csInlineTablePolicy
TomlSourceGenerationOptionsAttribute.csGets or sets inline table emission policy.
public TomlInlineTablePolicy InlineTablePolicy { get; set; }Property value
MappingOrder
TomlSourceGenerationOptionsAttribute.csGets or sets member ordering behavior for emitted mappings.
public TomlMappingOrderPolicy MappingOrder { get; set; }Property value
Gets or sets the newline kind used by the writer.
public TomlNewLineKind NewLine { get; set; }Property value
PreferredObjectCreationHandling
TomlSourceGenerationOptionsAttribute.csGets or sets the preferred object creation handling when deserializing object and collection members.
public TomlObjectCreationHandling PreferredObjectCreationHandling { get; set; }Property value
PropertyNameCaseInsensitive
TomlSourceGenerationOptionsAttribute.csPropertyNamingPolicy
TomlSourceGenerationOptionsAttribute.csGets or sets the policy used to convert CLR property names.
public TomlKnownNamingPolicy PropertyNamingPolicy { get; set; }Property value
RespectNullableAnnotations
TomlSourceGenerationOptionsAttribute.csRespectRequiredConstructorParameters
TomlSourceGenerationOptionsAttribute.csRootValueHandling
TomlSourceGenerationOptionsAttribute.csGets or sets behavior for scalar/array roots that do not naturally map to a TOML document.
public TomlRootValueHandling RootValueHandling { get; set; }Property value
RootValueKeyName
TomlSourceGenerationOptionsAttribute.csTableArrayStyle
TomlSourceGenerationOptionsAttribute.csGets or sets array-of-table emission style.
public TomlTableArrayStyle TableArrayStyle { get; set; }Property value
UnmappedMemberHandling
TomlSourceGenerationOptionsAttribute.csGets or sets how unmapped TOML keys are handled during object deserialization.
public TomlUnmappedMemberHandling UnmappedMemberHandling { get; set; }