Skip to main content

Definition

Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml.Serialization Inheritance: System.Enum

Syntax

Summary

Specifies the built-in XmlNamingPolicy that a source-generated context uses at run time.

Usage

XmlKnownNamingPolicy names the built-in naming policies as an enumeration, so that you can choose one in an attribute. An attribute argument has to be a compile-time constant, and an XmlNamingPolicy instance isn’t one. It is the type of the PropertyNamingPolicy, ElementNamingPolicy, and AttributeNamingPolicy properties of XmlSourceGenerationOptionsAttribute. It is the counterpart of JsonKnownNamingPolicy. When you set options in code instead, assign an XmlNamingPolicy to XmlSerializerOptions directly. See Use source generation and Customize names and shape.

Remarks

The values are selected through the naming policy properties of XmlSourceGenerationOptionsAttribute.

Values

  • CloudNimble.Text.Xml.XmlNamingPolicy
  • CloudNimble.Text.Xml.Serialization.XmlSourceGenerationOptionsAttribute
  • CloudNimble.Text.Xml.Serialization.XmlSerializerContext
  • CloudNimble.Text.Xml.XmlSerializerOptions