HttpContentMultipartExtensions.ReadAsMultipartAsync Method

 

Namespace:   System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync(HttpContent)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.

System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync(HttpContent, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.

System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync<T>(HttpContent, T)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.

System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync<T>(HttpContent, T, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.

System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync<T>(HttpContent, T, Int32)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.

System_CAPS_pubmethodSystem_CAPS_static ReadAsMultipartAsync<T>(HttpContent, T, Int32, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.

See Also

HttpContentMultipartExtensions Class
System.Net.Http Namespace

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync Method (HttpContent)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.

Syntax

public static Task<MultipartMemoryStreamProvider> ReadAsMultipartAsync(
    this HttpContent content
)
public:
[ExtensionAttribute]
static Task<MultipartMemoryStreamProvider^>^ ReadAsMultipartAsync(
    HttpContent^ content
)
static member ReadAsMultipartAsync : 
        content:HttpContent -> Task<MultipartMemoryStreamProvider>
<ExtensionAttribute>
Public Shared Function ReadAsMultipartAsync (
    content As HttpContent
) As Task(Of MultipartMemoryStreamProvider)

Parameters

Return Value

Type: System.Threading.Tasks.Task<MultipartMemoryStreamProvider>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync Method (HttpContent, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result.

Syntax

public static Task<MultipartMemoryStreamProvider> ReadAsMultipartAsync(
    this HttpContent content,
    CancellationToken cancellationToken
)
public:
[ExtensionAttribute]
static Task<MultipartMemoryStreamProvider^>^ ReadAsMultipartAsync(
    HttpContent^ content,
    CancellationToken cancellationToken
)
static member ReadAsMultipartAsync : 
        content:HttpContent *
        cancellationToken:CancellationToken -> Task<MultipartMemoryStreamProvider>
<ExtensionAttribute>
Public Shared Function ReadAsMultipartAsync (
    content As HttpContent,
    cancellationToken As CancellationToken
) As Task(Of MultipartMemoryStreamProvider)

Parameters

Return Value

Type: System.Threading.Tasks.Task<MultipartMemoryStreamProvider>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync<T> Method (HttpContent, T)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.

Syntax

public static Task<T> ReadAsMultipartAsync<T>(
    this HttpContent content,
    T streamProvider
)
where T : MultipartStreamProvider
public:
generic<typename T>
where T : MultipartStreamProvider
[ExtensionAttribute]
static Task<T>^ ReadAsMultipartAsync(
    HttpContent^ content,
    T streamProvider
)
static member ReadAsMultipartAsync<'T when 'T : MultipartStreamProvider> : 
        content:HttpContent *
        streamProvider:'T -> Task<'T>
<ExtensionAttribute>
Public Shared Function ReadAsMultipartAsync(Of T As MultipartStreamProvider) (
    content As HttpContent,
    streamProvider As T
) As Task(Of T)

Parameters

  • streamProvider
    Type: T

    A stream provider providing output streams for where to write body parts as they are parsed.

Return Value

Type: System.Threading.Tasks.Task<T>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Type Parameters

  • T
    The type of the MIME multipart.

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync<T> Method (HttpContent, T, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written.

Syntax

public static Task<T> ReadAsMultipartAsync<T>(
    this HttpContent content,
    T streamProvider,
    CancellationToken cancellationToken
)
where T : MultipartStreamProvider
public:
generic<typename T>
where T : MultipartStreamProvider
[ExtensionAttribute]
static Task<T>^ ReadAsMultipartAsync(
    HttpContent^ content,
    T streamProvider,
    CancellationToken cancellationToken
)
static member ReadAsMultipartAsync<'T when 'T : MultipartStreamProvider> : 
        content:HttpContent *
        streamProvider:'T *
        cancellationToken:CancellationToken -> Task<'T>
<ExtensionAttribute>
Public Shared Function ReadAsMultipartAsync(Of T As MultipartStreamProvider) (
    content As HttpContent,
    streamProvider As T,
    cancellationToken As CancellationToken
) As Task(Of T)

Parameters

  • streamProvider
    Type: T

    A stream provider providing output streams for where to write body parts as they are parsed.

Return Value

Type: System.Threading.Tasks.Task<T>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Type Parameters

  • T
    The type of the MIME multipart.

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync<T> Method (HttpContent, T, Int32)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.

Syntax

public static Task<T> ReadAsMultipartAsync<T>(
    this HttpContent content,
    T streamProvider,
    int bufferSize
)
where T : MultipartStreamProvider
public:
generic<typename T>
where T : MultipartStreamProvider
[ExtensionAttribute]
static Task<T>^ ReadAsMultipartAsync(
    HttpContent^ content,
    T streamProvider,
    int bufferSize
)
static member ReadAsMultipartAsync<'T when 'T : MultipartStreamProvider> : 
        content:HttpContent *
        streamProvider:'T *
        bufferSize:int -> Task<'T>
<ExtensionAttribute>
Public Shared Function ReadAsMultipartAsync(Of T As MultipartStreamProvider) (
    content As HttpContent,
    streamProvider As T,
    bufferSize As Integer
) As Task(Of T)

Parameters

  • streamProvider
    Type: T

    A stream provider providing output streams for where to write body parts as they are parsed.

  • bufferSize
    Type: System.Int32

    Size of the buffer used to read the contents.

Return Value

Type: System.Threading.Tasks.Task<T>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Type Parameters

  • T
    The type of the MIME multipart.

Return to top

HttpContentMultipartExtensions.ReadAsMultipartAsync<T> Method (HttpContent, T, Int32, CancellationToken)

Reads all body parts within a MIME multipart message and produces a set of HttpContent instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.

Syntax

[DebuggerStepThroughAttribute]
public static Task<T> ReadAsMultipartAsync<T>(
    this HttpContent content,
    T streamProvider,
    int bufferSize,
    CancellationToken cancellationToken
)
where T : MultipartStreamProvider
public:
generic<typename T>
where T : MultipartStreamProvider
[ExtensionAttribute]
[DebuggerStepThroughAttribute]
static Task<T>^ ReadAsMultipartAsync(
    HttpContent^ content,
    T streamProvider,
    int bufferSize,
    CancellationToken cancellationToken
)
[<DebuggerStepThroughAttribute>]
static member ReadAsMultipartAsync<'T when 'T : MultipartStreamProvider> : 
        content:HttpContent *
        streamProvider:'T *
        bufferSize:int *
        cancellationToken:CancellationToken -> Task<'T>
<ExtensionAttribute>
<DebuggerStepThroughAttribute>
Public Shared Function ReadAsMultipartAsync(Of T As MultipartStreamProvider) (
    content As HttpContent,
    streamProvider As T,
    bufferSize As Integer,
    cancellationToken As CancellationToken
) As Task(Of T)

Parameters

  • streamProvider
    Type: T

    A stream provider providing output streams for where to write body parts as they are parsed.

  • bufferSize
    Type: System.Int32

    Size of the buffer used to read the contents.

Return Value

Type: System.Threading.Tasks.Task<T>

A Task<TResult> representing the tasks of getting the collection of HttpContent instances where each instance represents a body part.

Type Parameters

  • T
    The type of the MIME multipart.

Return to top