BinaryData Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BinaryData(Byte[]) |
Creates a BinaryData instance by wrapping the provided byte array. |
BinaryData(ReadOnlyMemory<Byte>) |
Creates a BinaryData instance by wrapping the provided bytes. |
BinaryData(String) |
Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding. |
BinaryData(Byte[], String) | |
BinaryData(ReadOnlyMemory<Byte>, String) | |
BinaryData(String, String) | |
BinaryData(Object, JsonSerializerOptions, Type) |
Creates a BinaryData instance by serializing the provided object to JSON using JsonSerializer. |
BinaryData(Object, JsonSerializerContext, Type) |
Creates a BinaryData instance by serializing the provided object to JSON using JsonSerializer. |
BinaryData(Byte[])
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Creates a BinaryData instance by wrapping the provided byte array.
public:
BinaryData(cli::array <System::Byte> ^ data);
public BinaryData (byte[] data);
new BinaryData : byte[] -> BinaryData
Public Sub New (data As Byte())
Parameters
- data
- Byte[]
The byte array to wrap.
Applies to
BinaryData(ReadOnlyMemory<Byte>)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Creates a BinaryData instance by wrapping the provided bytes.
public:
BinaryData(ReadOnlyMemory<System::Byte> data);
public BinaryData (ReadOnlyMemory<byte> data);
new BinaryData : ReadOnlyMemory<byte> -> BinaryData
Public Sub New (data As ReadOnlyMemory(Of Byte))
Parameters
- data
- ReadOnlyMemory<Byte>
The byte data to wrap.
Applies to
BinaryData(String)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Creates a BinaryData instance from a string by converting the string to bytes using the UTF-8 encoding.
public:
BinaryData(System::String ^ data);
public BinaryData (string data);
new BinaryData : string -> BinaryData
Public Sub New (data As String)
Parameters
- data
- String
The string data.
Applies to
BinaryData(Byte[], String)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
public:
BinaryData(cli::array <System::Byte> ^ data, System::String ^ mediaType);
public BinaryData (byte[] data, string? mediaType);
new BinaryData : byte[] * string -> BinaryData
Public Sub New (data As Byte(), mediaType As String)
Parameters
- data
- Byte[]
- mediaType
- String
Applies to
BinaryData(ReadOnlyMemory<Byte>, String)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
public:
BinaryData(ReadOnlyMemory<System::Byte> data, System::String ^ mediaType);
public BinaryData (ReadOnlyMemory<byte> data, string? mediaType);
new BinaryData : ReadOnlyMemory<byte> * string -> BinaryData
Public Sub New (data As ReadOnlyMemory(Of Byte), mediaType As String)
Parameters
- data
- ReadOnlyMemory<Byte>
- mediaType
- String
Applies to
BinaryData(String, String)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
public:
BinaryData(System::String ^ data, System::String ^ mediaType);
public BinaryData (string data, string? mediaType);
new BinaryData : string * string -> BinaryData
Public Sub New (data As String, mediaType As String)
Parameters
- data
- String
- mediaType
- String
Applies to
BinaryData(Object, JsonSerializerOptions, Type)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Creates a BinaryData instance by serializing the provided object to JSON using JsonSerializer.
public BinaryData (object? jsonSerializable, System.Text.Json.JsonSerializerOptions? options = default, Type? type = default);
new BinaryData : obj * System.Text.Json.JsonSerializerOptions * Type -> BinaryData
Public Sub New (jsonSerializable As Object, Optional options As JsonSerializerOptions = Nothing, Optional type As Type = Nothing)
Parameters
- jsonSerializable
- Object
The object to serialize to JSON using JsonSerializer.
- options
- JsonSerializerOptions
The options to use when serializing to JSON.
- type
- Type
The type to use when serializing the data. If not specified, GetType() will be used to determine the type.
Applies to
BinaryData(Object, JsonSerializerContext, Type)
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Creates a BinaryData instance by serializing the provided object to JSON using JsonSerializer.
public BinaryData (object? jsonSerializable, System.Text.Json.Serialization.JsonSerializerContext context, Type? type = default);
new BinaryData : obj * System.Text.Json.Serialization.JsonSerializerContext * Type -> BinaryData
Public Sub New (jsonSerializable As Object, context As JsonSerializerContext, Optional type As Type = Nothing)
Parameters
- jsonSerializable
- Object
The object that will be serialized to JSON using JsonSerializer.
- context
- JsonSerializerContext
The JsonSerializerContext to use when serializing to JSON.
- type
- Type
The type to use when serializing the data. If not specified, GetType() will be used to determine the type.