MultiPartFormContent.Add Method

Definition

Overloads

Name Description
Add(String, UInt64, String)

Adds the provided UInt64 as a part of this MultiPartFormContent.

Add(String, UInt32, String)

Adds the provided UInt32 as a part of this MultiPartFormContent.

Add(String, UInt16, String)

Adds the provided UInt16 as a part of this MultiPartFormContent.

Add(String, String, String)

Adds the provided String as a part of this MultiPartFormContent.

Add(String, Single, String)

Adds the provided Single as a part of this MultiPartFormContent.

Add(String, SByte, String)

Adds the provided SByte as a part of this MultiPartFormContent.

Add(String, Int32, String)

Adds the provided Int32 as a part of this MultiPartFormContent.

Add(String, Int16, String)

Adds the provided Int16 as a part of this MultiPartFormContent.

Add(String, Int64, String)

Adds the provided Int64 as a part of this MultiPartFormContent.

Add(String, Decimal, String)

Adds the provided Decimal as a part of this MultiPartFormContent.

Add(String, Char, String)

Adds the provided Char as a part of this MultiPartFormContent.

Add(String, Byte[], String)

Adds the provided byte array as a part of this MultiPartFormContent.

Add(String, Byte, String)

Adds the provided Byte as a part of this MultiPartFormContent.

Add(String, Boolean, String)

Adds the provided Boolean as a part of this MultiPartFormContent.

Add(String, FileBinaryContent)

Adds the provided FileBinaryContent as a part of this MultiPartFormContent and transfers ownership of fileContent to this instance.

Add(String, BinaryData)

Adds the bytes held in the provided BinaryData as a part of this MultiPartFormContent. The media type from MediaType, if any, is used for the part.

Add(String, Double, String)

Adds the provided Double as a part of this MultiPartFormContent.

Add<T>(String, IPersistableModel<T>)

Adds the provided IPersistableModel<T> as a part of this MultiPartFormContent using the default wire-format options and an application/json media type.

Add<T>(String, IPersistableModel<T>, ModelReaderWriterContext, ModelReaderWriterOptions, String)

Adds the provided IPersistableModel<T> as a part of this MultiPartFormContent.

Add(String, UInt64, String)

Source:
MultiPartFormContent.cs

Adds the provided UInt64 as a part of this MultiPartFormContent.

public void Add(string name, ulong content, string? mediaType = "text/plain");
member this.Add : string * uint64 * string -> unit
Public Sub Add (name As String, content As ULong, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
UInt64

The UInt64 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, UInt32, String)

Source:
MultiPartFormContent.cs

Adds the provided UInt32 as a part of this MultiPartFormContent.

public void Add(string name, uint content, string? mediaType = "text/plain");
member this.Add : string * uint32 * string -> unit
Public Sub Add (name As String, content As UInteger, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
UInt32

The UInt32 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, UInt16, String)

Source:
MultiPartFormContent.cs

Adds the provided UInt16 as a part of this MultiPartFormContent.

public void Add(string name, ushort content, string? mediaType = "text/plain");
member this.Add : string * uint16 * string -> unit
Public Sub Add (name As String, content As UShort, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
UInt16

The UInt16 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, String, String)

Source:
MultiPartFormContent.cs

Adds the provided String as a part of this MultiPartFormContent.

public void Add(string name, string content, string? mediaType = "text/plain");
member this.Add : string * string * string -> unit
Public Sub Add (name As String, content As String, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
String

The String to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Single, String)

Source:
MultiPartFormContent.cs

Adds the provided Single as a part of this MultiPartFormContent.

public void Add(string name, float content, string? mediaType = "text/plain");
member this.Add : string * single * string -> unit
Public Sub Add (name As String, content As Single, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Single

The Single to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, SByte, String)

Source:
MultiPartFormContent.cs

Adds the provided SByte as a part of this MultiPartFormContent.

public void Add(string name, sbyte content, string? mediaType = "text/plain");
member this.Add : string * sbyte * string -> unit
Public Sub Add (name As String, content As SByte, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
SByte

The SByte to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Int32, String)

Source:
MultiPartFormContent.cs

Adds the provided Int32 as a part of this MultiPartFormContent.

public void Add(string name, int content, string? mediaType = "text/plain");
member this.Add : string * int * string -> unit
Public Sub Add (name As String, content As Integer, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Int32

The Int32 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Int16, String)

Source:
MultiPartFormContent.cs

Adds the provided Int16 as a part of this MultiPartFormContent.

public void Add(string name, short content, string? mediaType = "text/plain");
member this.Add : string * int16 * string -> unit
Public Sub Add (name As String, content As Short, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Int16

The Int16 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Int64, String)

Source:
MultiPartFormContent.cs

Adds the provided Int64 as a part of this MultiPartFormContent.

public void Add(string name, long content, string? mediaType = "text/plain");
member this.Add : string * int64 * string -> unit
Public Sub Add (name As String, content As Long, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Int64

The Int64 to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Decimal, String)

Source:
MultiPartFormContent.cs

Adds the provided Decimal as a part of this MultiPartFormContent.

public void Add(string name, decimal content, string? mediaType = "text/plain");
member this.Add : string * decimal * string -> unit
Public Sub Add (name As String, content As Decimal, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Decimal

The Decimal to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Char, String)

Source:
MultiPartFormContent.cs

Adds the provided Char as a part of this MultiPartFormContent.

public void Add(string name, char content, string? mediaType = "text/plain");
member this.Add : string * char * string -> unit
Public Sub Add (name As String, content As Char, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Char

The Char to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Byte[], String)

Source:
MultiPartFormContent.cs

Adds the provided byte array as a part of this MultiPartFormContent.

public void Add(string name, byte[] content, string? mediaType = "application/octet-stream");
member this.Add : string * byte[] * string -> unit
Public Sub Add (name As String, content As Byte(), Optional mediaType As String = "application/octet-stream")

Parameters

name
String

The form field name for the part.

content
Byte[]

The byte array to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Byte, String)

Source:
MultiPartFormContent.cs

Adds the provided Byte as a part of this MultiPartFormContent.

public void Add(string name, byte content, string? mediaType = "text/plain");
member this.Add : string * byte * string -> unit
Public Sub Add (name As String, content As Byte, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Byte

The Byte to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, Boolean, String)

Source:
MultiPartFormContent.cs

Adds the provided Boolean as a part of this MultiPartFormContent.

public void Add(string name, bool content, string? mediaType = "text/plain");
member this.Add : string * bool * string -> unit
Public Sub Add (name As String, content As Boolean, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Boolean

The Boolean to add as a part.

mediaType
String

The media type for the part.

Applies to

Add(String, FileBinaryContent)

Source:
MultiPartFormContent.cs

Adds the provided FileBinaryContent as a part of this MultiPartFormContent and transfers ownership of fileContent to this instance.

public void Add(string name, System.ClientModel.FileBinaryContent fileContent);
member this.Add : string * System.ClientModel.FileBinaryContent -> unit
Public Sub Add (name As String, fileContent As FileBinaryContent)

Parameters

name
String

The form field name for the part.

fileContent
FileBinaryContent

The FileBinaryContent to add as a part.

Applies to

Add(String, BinaryData)

Source:
MultiPartFormContent.cs

Adds the bytes held in the provided BinaryData as a part of this MultiPartFormContent. The media type from MediaType, if any, is used for the part.

public void Add(string name, BinaryData content);
member this.Add : string * BinaryData -> unit
Public Sub Add (name As String, content As BinaryData)

Parameters

name
String

The form field name for the part.

content
BinaryData

The BinaryData to add as a part.

Applies to

Add(String, Double, String)

Source:
MultiPartFormContent.cs

Adds the provided Double as a part of this MultiPartFormContent.

public void Add(string name, double content, string? mediaType = "text/plain");
member this.Add : string * double * string -> unit
Public Sub Add (name As String, content As Double, Optional mediaType As String = "text/plain")

Parameters

name
String

The form field name for the part.

content
Double

The Double to add as a part.

mediaType
String

The media type for the part.

Applies to

Add<T>(String, IPersistableModel<T>)

Source:
MultiPartFormContent.cs

Adds the provided IPersistableModel<T> as a part of this MultiPartFormContent using the default wire-format options and an application/json media type.

public void Add<T>(string name, System.ClientModel.Primitives.IPersistableModel<T> model);
member this.Add : string * System.ClientModel.Primitives.IPersistableModel<'T> -> unit
Public Sub Add(Of T) (name As String, model As IPersistableModel(Of T))

Type Parameters

T

The model type.

Parameters

name
String

The form field name for the part.

model
IPersistableModel<T>

The IPersistableModel<T> to add as a part.

Applies to

Add<T>(String, IPersistableModel<T>, ModelReaderWriterContext, ModelReaderWriterOptions, String)

Source:
MultiPartFormContent.cs

Adds the provided IPersistableModel<T> as a part of this MultiPartFormContent.

public void Add<T>(string name, System.ClientModel.Primitives.IPersistableModel<T> model, System.ClientModel.Primitives.ModelReaderWriterContext context, System.ClientModel.Primitives.ModelReaderWriterOptions options, string mediaType);
member this.Add : string * System.ClientModel.Primitives.IPersistableModel<'T> * System.ClientModel.Primitives.ModelReaderWriterContext * System.ClientModel.Primitives.ModelReaderWriterOptions * string -> unit
Public Sub Add(Of T) (name As String, model As IPersistableModel(Of T), context As ModelReaderWriterContext, options As ModelReaderWriterOptions, mediaType As String)

Type Parameters

T

The model type.

Parameters

name
String

The form field name for the part.

model
IPersistableModel<T>

The IPersistableModel<T> to add as a part.

context
ModelReaderWriterContext

The ModelReaderWriterContext used to write the model.

options
ModelReaderWriterOptions

The ModelReaderWriterOptions that indicates what format the model will be written in.

mediaType
String

The media type for the part.

Applies to