AIJsonUtilities.AddAIContentType Methode

Definitie

Overloads

Name Description
AddAIContentType(JsonSerializerOptions, Type, String)

Hiermee voegt u een aangepast inhoudstype toe aan de polymorfe configuratie voor AIContent.

AddAIContentType<TContent>(JsonSerializerOptions, String)

Hiermee voegt u een aangepast inhoudstype toe aan de polymorfe configuratie voor AIContent.

AddAIContentType(JsonSerializerOptions, Type, String)

Bron:
AIJsonUtilities.cs

Hiermee voegt u een aangepast inhoudstype toe aan de polymorfe configuratie voor AIContent.

public:
[System::Runtime::CompilerServices::Extension]
 static void AddAIContentType(System::Text::Json::JsonSerializerOptions ^ options, Type ^ contentType, System::String ^ typeDiscriminatorId);
public static void AddAIContentType(this System.Text.Json.JsonSerializerOptions options, Type contentType, string typeDiscriminatorId);
static member AddAIContentType : System.Text.Json.JsonSerializerOptions * Type * string -> unit
<Extension()>
Public Sub AddAIContentType (options As JsonSerializerOptions, contentType As Type, typeDiscriminatorId As String)

Parameters

options
JsonSerializerOptions

Het exemplaar van de opties dat moet worden geconfigureerd.

contentType
Type

Het aangepaste inhoudstype dat moet worden geconfigureerd.

typeDiscriminatorId
String

De id van het type discriminator voor het inhoudstype.

Uitzonderingen

options, contentTypeof typeDiscriminatorId is null.

contentType is een ingebouwd inhoudstype of is niet afgeleid van AIContent.

options is een alleen-lezen exemplaar.

Van toepassing op

AddAIContentType<TContent>(JsonSerializerOptions, String)

Bron:
AIJsonUtilities.cs

Hiermee voegt u een aangepast inhoudstype toe aan de polymorfe configuratie voor AIContent.

public:
generic <typename TContent>
 where TContent : Microsoft::Extensions::AI::AIContent[System::Runtime::CompilerServices::Extension]
 static void AddAIContentType(System::Text::Json::JsonSerializerOptions ^ options, System::String ^ typeDiscriminatorId);
public static void AddAIContentType<TContent>(this System.Text.Json.JsonSerializerOptions options, string typeDiscriminatorId) where TContent : Microsoft.Extensions.AI.AIContent;
static member AddAIContentType : System.Text.Json.JsonSerializerOptions * string -> unit (requires 'Content :> Microsoft.Extensions.AI.AIContent)
<Extension()>
Public Sub AddAIContentType(Of TContent As AIContent) (options As JsonSerializerOptions, typeDiscriminatorId As String)

Type parameters

TContent

Het aangepaste inhoudstype dat moet worden geconfigureerd.

Parameters

options
JsonSerializerOptions

Het exemplaar van de opties dat moet worden geconfigureerd.

typeDiscriminatorId
String

De id van het type discriminator voor het inhoudstype.

Uitzonderingen

options of typeDiscriminatorId is null.

TContent is een ingebouwd inhoudstype.

options is een alleen-lezen exemplaar.

Van toepassing op