<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.5" />

HttpContentMultipartExtensions

public static class HttpContentMultipartExtensions
Extension methods to read MIME multipart entities from HttpContent instances.
public static bool IsMimeMultipartContent(this HttpContent content)

Determines whether the specified content is MIME multipart content.

public static bool IsMimeMultipartContent(this HttpContent content, string subtype)

Determines whether the specified content is MIME multipart content with the specified subtype. For example, the subtype mixed would match content with a content type of multipart/mixed.

Reads all body parts within a MIME multipart message into memory using a MultipartMemoryStreamProvider.

Reads all body parts within a MIME multipart message into memory using a MultipartMemoryStreamProvider.

public static Task<T> ReadAsMultipartAsync<T>(this HttpContent content, T streamProvider) where T : MultipartStreamProvider

Reads all body parts within a MIME multipart message using the provided MultipartStreamProvider instance to determine where the contents of each body part is written.

public static Task<T> ReadAsMultipartAsync<T>(this HttpContent content, T streamProvider, CancellationToken cancellationToken) where T : MultipartStreamProvider

Reads all body parts within a MIME multipart message using the provided MultipartStreamProvider instance to determine where the contents of each body part is written.

public static Task<T> ReadAsMultipartAsync<T>(this HttpContent content, T streamProvider, int bufferSize) where T : MultipartStreamProvider

Reads all body parts within a MIME multipart message using the provided MultipartStreamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.

public static Task<T> ReadAsMultipartAsync<T>(this HttpContent content, T streamProvider, int bufferSize, CancellationToken cancellationToken) where T : MultipartStreamProvider

Reads all body parts within a MIME multipart message using the provided MultipartStreamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size.