Język

DataContent Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy DataContent.

Przeciążenia

Nazwisko Opis
DataContent(ReadOnlyMemory<Byte>, String)

Inicjuje nowe wystąpienie klasy DataContent.

DataContent(String, String)

Inicjuje nowe wystąpienie klasy DataContent.

DataContent(Uri, String)

Inicjuje nowe wystąpienie klasy DataContent.

DataContent(ReadOnlyMemory<Byte>, String)

Inicjuje nowe wystąpienie klasy DataContent.

public:
 DataContent(ReadOnlyMemory<System::Byte> data, System::String ^ mediaType);
public DataContent(ReadOnlyMemory<byte> data, string mediaType);
new Microsoft.Extensions.AI.DataContent : ReadOnlyMemory<byte> * string -> Microsoft.Extensions.AI.DataContent
Public Sub New (data As ReadOnlyMemory(Of Byte), mediaType As String)

Parametry

data
ReadOnlyMemory<Byte>

Zawartość bajtu.

mediaType
String

Typ nośnika (znany również jako typ MIME) reprezentowany przez zawartość.

Wyjątki

Parametr mediaType ma wartość null.

mediaType reprezentuje nieprawidłowy typ nośnika.

Dotyczy

DataContent(String, String)

Inicjuje nowe wystąpienie klasy DataContent.

[System.Text.Json.Serialization.JsonConstructor]
public DataContent(string uri, string? mediaType = default);
[<System.Text.Json.Serialization.JsonConstructor>]
new Microsoft.Extensions.AI.DataContent : string * string -> Microsoft.Extensions.AI.DataContent
Public Sub New (uri As String, Optional mediaType As String = Nothing)

Parametry

uri
String

Identyfikator URI danych zawierający zawartość.

mediaType
String

Typ nośnika (znany również jako typ MIME) reprezentowany przez zawartość.

Atrybuty

Wyjątki

Parametr uri ma wartość null.

mediaType jest nieprawidłowym typem nośnika.

Dotyczy

DataContent(Uri, String)

Inicjuje nowe wystąpienie klasy DataContent.

public DataContent(Uri uri, string? mediaType = default);
new Microsoft.Extensions.AI.DataContent : Uri * string -> Microsoft.Extensions.AI.DataContent
Public Sub New (uri As Uri, Optional mediaType As String = Nothing)

Parametry

uri
Uri

Identyfikator URI danych zawierający zawartość.

mediaType
String

Typ nośnika (znany również jako typ MIME) reprezentowany przez zawartość. Jeśli nie zostanie podany, należy go podać w ramach elementu uri.

Wyjątki

Parametr uri ma wartość null.

mediaType jest nieprawidłowym typem nośnika.

Dotyczy