共用方式為


RequestContent.Create Method

Definition

Overloads

Create(Object, JsonPropertyNames, String)

Creates an instance of RequestContent that wraps a serialized version of an object.

Create(Byte[], Int32, Int32)

Creates an instance of RequestContent that wraps an Arrayof Byte.

Create(String)

Creates a RequestContent representing the UTF-8 Encoding of the given String/

Create(ReadOnlyMemory<Byte>)

Creates an instance of RequestContent that wraps a Stream.

Create(Object)

Creates an instance of RequestContent that wraps a serialized version of an object.

Create(Object, ObjectSerializer)

Creates an instance of RequestContent that wraps a serialized version of an object.

Create(Byte[])

Creates an instance of RequestContent that wraps an Arrayof Byte.

Create(ReadOnlySequence<Byte>)

Creates an instance of RequestContent that wraps a ReadOnlySequence<T>.

Create(BinaryData)

Creates an instance of RequestContent that wraps a BinaryData.

Create(DynamicData)

Creates an instance of RequestContent that wraps a DynamicData.

Create(Stream)

Creates an instance of RequestContent that wraps a Stream.

Create(Object, JsonPropertyNames, String)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a serialized version of an object.

public static Azure.Core.RequestContent Create (object serializable, Azure.Core.Serialization.JsonPropertyNames propertyNameFormat, string dateTimeFormat = "o");
static member Create : obj * Azure.Core.Serialization.JsonPropertyNames * string -> Azure.Core.RequestContent
Public Shared Function Create (serializable As Object, propertyNameFormat As JsonPropertyNames, Optional dateTimeFormat As String = "o") As RequestContent

Parameters

serializable
Object

The Object to serialize.

propertyNameFormat
JsonPropertyNames

The format to use for property names in the serialized content.

dateTimeFormat
String

The format to use for DateTime and DateTimeOffset values in the serialized content.

Returns

An instance of RequestContent that wraps a serialized version of the object.

Applies to

Create(Byte[], Int32, Int32)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps an Arrayof Byte.

public static Azure.Core.RequestContent Create (byte[] bytes, int index, int length);
static member Create : byte[] * int * int -> Azure.Core.RequestContent
Public Shared Function Create (bytes As Byte(), index As Integer, length As Integer) As RequestContent

Parameters

bytes
Byte[]

The Arrayof Byte to use.

index
Int32

The offset in bytes to start from.

length
Int32

The length of the segment to use.

Returns

An instance of RequestContent that wraps provided Arrayof Byte.

Applies to

Create(String)

Source:
RequestContent.cs

Creates a RequestContent representing the UTF-8 Encoding of the given String/

public static Azure.Core.RequestContent Create (string content);
static member Create : string -> Azure.Core.RequestContent
Public Shared Function Create (content As String) As RequestContent

Parameters

content
String

The String to use.

Returns

An instance of RequestContent that wraps a String.

Remarks

The returned content represents the UTF-8 Encoding of the given string.

Applies to

Create(ReadOnlyMemory<Byte>)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a Stream.

public static Azure.Core.RequestContent Create (ReadOnlyMemory<byte> bytes);
static member Create : ReadOnlyMemory<byte> -> Azure.Core.RequestContent
Public Shared Function Create (bytes As ReadOnlyMemory(Of Byte)) As RequestContent

Parameters

Returns

An instance of RequestContent that wraps a ReadOnlyMemory<T>.

Applies to

Create(Object)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a serialized version of an object.

public static Azure.Core.RequestContent Create (object serializable);
static member Create : obj -> Azure.Core.RequestContent
Public Shared Function Create (serializable As Object) As RequestContent

Parameters

serializable
Object

The Object to serialize.

Returns

An instance of RequestContent that wraps a serialized version of the object.

Applies to

Create(Object, ObjectSerializer)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a serialized version of an object.

public static Azure.Core.RequestContent Create (object serializable, Azure.Core.Serialization.ObjectSerializer? serializer);
static member Create : obj * Azure.Core.Serialization.ObjectSerializer -> Azure.Core.RequestContent
Public Shared Function Create (serializable As Object, serializer As ObjectSerializer) As RequestContent

Parameters

serializable
Object

The Object to serialize.

serializer
ObjectSerializer

The ObjectSerializer to use to convert the object to bytes. If not provided, JsonObjectSerializer is used.

Returns

An instance of RequestContent that wraps a serialized version of the object.

Applies to

Create(Byte[])

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps an Arrayof Byte.

public static Azure.Core.RequestContent Create (byte[] bytes);
static member Create : byte[] -> Azure.Core.RequestContent
Public Shared Function Create (bytes As Byte()) As RequestContent

Parameters

bytes
Byte[]

The Arrayof Byte to use.

Returns

An instance of RequestContent that wraps provided Arrayof Byte.

Applies to

Create(ReadOnlySequence<Byte>)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a ReadOnlySequence<T>.

public static Azure.Core.RequestContent Create (System.Buffers.ReadOnlySequence<byte> bytes);
static member Create : System.Buffers.ReadOnlySequence<byte> -> Azure.Core.RequestContent
Public Shared Function Create (bytes As ReadOnlySequence(Of Byte)) As RequestContent

Parameters

Returns

An instance of RequestContent that wraps a ReadOnlySequence<T>.

Applies to

Create(BinaryData)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a BinaryData.

public static Azure.Core.RequestContent Create (BinaryData content);
static member Create : BinaryData -> Azure.Core.RequestContent
Public Shared Function Create (content As BinaryData) As RequestContent

Parameters

content
BinaryData

The BinaryData to use.

Returns

An instance of RequestContent that wraps a BinaryData.

Applies to

Create(DynamicData)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a DynamicData.

public static Azure.Core.RequestContent Create (Azure.Core.Serialization.DynamicData content);
static member Create : Azure.Core.Serialization.DynamicData -> Azure.Core.RequestContent
Public Shared Function Create (content As DynamicData) As RequestContent

Parameters

content
DynamicData

The DynamicData to use.

Returns

An instance of RequestContent that wraps a DynamicData.

Applies to

Create(Stream)

Source:
RequestContent.cs

Creates an instance of RequestContent that wraps a Stream.

public static Azure.Core.RequestContent Create (System.IO.Stream stream);
static member Create : System.IO.Stream -> Azure.Core.RequestContent
Public Shared Function Create (stream As Stream) As RequestContent

Parameters

stream
Stream

The Stream to use.

Returns

An instance of RequestContent that wraps a Stream.

Applies to