Compartilhar via


JsonMetadataServices.CreateObjectInfo<T> Método

Definição

Cria metadados para uma classe complexa ou struct.

public:
generic <typename T>
 static System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ CreateObjectInfo(System::Text::Json::JsonSerializerOptions ^ options, System::Text::Json::Serialization::Metadata::JsonObjectInfoValues<T> ^ objectInfo);
public static System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> CreateObjectInfo<T> (System.Text.Json.JsonSerializerOptions options, System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<T> objectInfo);
static member CreateObjectInfo : System.Text.Json.JsonSerializerOptions * System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<'T> -> System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T>
Public Shared Function CreateObjectInfo(Of T) (options As JsonSerializerOptions, objectInfo As JsonObjectInfoValues(Of T)) As JsonTypeInfo(Of T)

Parâmetros de tipo

T

O tipo da classe ou struct.

Parâmetros

options
JsonSerializerOptions

O JsonSerializerOptions a ser usado para serialização e desserialização.

objectInfo
JsonObjectInfoValues<T>

Fornece metadados de serialização sobre um tipo de objeto com construtores, propriedades e campos.

Retornos

JsonTypeInfo<T>

Uma JsonTypeInfo<T> instância que representa a classe ou o struct.

Exceções

options ou objectInfo é null.

Comentários

Essa API é usada pela saída do gerador de origem System.Text.Json e não deve ser chamada diretamente.

Aplica-se a