Share via


BinaryContent Constructors

Definition

Overloads

BinaryContent()

Initializes a new instance of the BinaryContent class with no content.

BinaryContent(String)

Initializes a new instance of the BinaryContent class for a UriData or Uri referred content.

BinaryContent(Uri)

Initializes a new instance of the BinaryContent class referring to an external uri.

BinaryContent(ReadOnlyMemory<Byte>, String)

Initializes a new instance of the BinaryContent class from a byte array.

BinaryContent()

Initializes a new instance of the BinaryContent class with no content.

[System.Text.Json.Serialization.JsonConstructor]
public BinaryContent ();
Public Sub New ()
Attributes

Remarks

Should be used only for serialization purposes.

Applies to

BinaryContent(String)

Initializes a new instance of the BinaryContent class for a UriData or Uri referred content.

public BinaryContent (string dataUri);
new Microsoft.SemanticKernel.BinaryContent : string -> Microsoft.SemanticKernel.BinaryContent
Public Sub New (dataUri As String)

Parameters

dataUri
String

The Uri of the content.

Applies to

BinaryContent(Uri)

Initializes a new instance of the BinaryContent class referring to an external uri.

public BinaryContent (Uri uri);
new Microsoft.SemanticKernel.BinaryContent : Uri -> Microsoft.SemanticKernel.BinaryContent
Public Sub New (uri As Uri)

Parameters

uri
Uri

Applies to

BinaryContent(ReadOnlyMemory<Byte>, String)

Initializes a new instance of the BinaryContent class from a byte array.

public BinaryContent (ReadOnlyMemory<byte> data, string? mimeType);
new Microsoft.SemanticKernel.BinaryContent : ReadOnlyMemory<byte> * string -> Microsoft.SemanticKernel.BinaryContent
Public Sub New (data As ReadOnlyMemory(Of Byte), mimeType As String)

Parameters

data
ReadOnlyMemory<Byte>

Byte array content

mimeType
String

The mime type of the content

Applies to