语言

JsonTypeInfo.Properties 属性

定义

获取与当前类型对应的元数据列表 JsonPropertyInfo 。

public:
 property System::Collections::Generic::IList<System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^> ^ Properties { System::Collections::Generic::IList<System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^> ^ get(); };
public System.Collections.Generic.IList<System.Text.Json.Serialization.Metadata.JsonPropertyInfo> Properties { get; }
member this.Properties : System.Collections.Generic.IList<System.Text.Json.Serialization.Metadata.JsonPropertyInfo>
Public ReadOnly Property Properties As IList(Of JsonPropertyInfo)

属性值

注解

此属性仅适用于类型 Object元数据。 对于其他类型,将返回空只读列表。

列表中的条目顺序决定了序列化顺序JsonPropertyInfo,除非其中任一项指定了非零Order值,在这种情况下,属性将稳定排序。Order

添加 JsonPropertyInfo 的条目最多 Name是唯一的,但在元数据实例被锁定以供进一步修改后,只会在序列化时对此进行验证。

适用于