TomlSerializableAttribute Class
Specifies a root type to include in a source-generated TomlSerializerContext.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class TomlSerializableAttribute : TomlAttribute- Inheritance
TomlAttributeTomlSerializableAttribute
Constructors
| Name | Description |
|---|---|
| TomlSerializableAttribute(Type) | Initializes a new instance of the TomlSerializableAttribute class. |
TomlSerializableAttribute(Type)
TomlSerializableAttribute.csInitializes a new instance of the TomlSerializableAttribute class.
public TomlSerializableAttribute(Type type)Parameters
typeType- The root type to include in the generated context.
Properties
| Name | Description |
|---|---|
| Type | Gets the root type included in the generated context. |
| TypeInfoPropertyName | Gets or sets the generated TomlTypeInfo property name for this root type. |
TypeInfoPropertyName
TomlSerializableAttribute.csGets or sets the generated TomlTypeInfo property name for this root type.
public string? TypeInfoPropertyName { get; set; }