YamlSerializableAttribute class

Instructs the System.Text.Yaml source generator to generate source code to help optimize performance when serializing and deserializing instances of the specified type and types in its object graph.

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

public sealed class YamlSerializableAttribute : YamlAttribute

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

Instructs the System.Text.Yaml source generator to generate source code to help optimize performance when serializing and deserializing instances of the specified type and types in its object graph.

ConstructorsLink to this heading

Initializes a new instance of YamlSerializableAttribute with the specified type.

public YamlSerializableAttribute(Type type);

Parameters

  • type: The type to generate source code for.

PropertiesLink to this heading

GenerationModeLink to this heading

Determines what the source generator should generate for the type. If the value is YamlSourceGenerationMode.Default, then the setting specified on YamlSourceGenerationOptionsAttribute.GenerationMode will be used.

public YamlSourceGenerationMode GenerationMode { get; set; }

TypeInfoPropertyNameLink to this heading

The name of the property for the generated YamlTypeInfo<T> for the type on the generated, derived YamlSerializerContext type.

public string? TypeInfoPropertyName { get; set; }

Useful to resolve a name collision with another type in the compilation closure.

Generated from the XML documentation of the libraryBuilt with Douze

Esc to close