다음을 통해 공유


MultipartContent Class

Provides a collection of HttpContent objects that get serialized using the multipart/* content type specification.

Inheritance Hierarchy

System.Object
  System.Net.Http.HttpContent
    System.Net.Http.MultipartContent
      System.Net.Http.MultipartFormDataContent

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

Syntax

'Declaration
Public Class MultipartContent _
    Inherits HttpContent _
    Implements IEnumerable(Of HttpContent), IEnumerable
'Usage
Dim instance As MultipartContent
public class MultipartContent : HttpContent, 
    IEnumerable<HttpContent>, IEnumerable
public ref class MultipartContent : public HttpContent, 
    IEnumerable<HttpContent^>, IEnumerable
type MultipartContent =  
    class 
        inherit HttpContent 
        interface IEnumerable<HttpContent>
        interface IEnumerable 
    end
public class MultipartContent extends HttpContent implements IEnumerable<HttpContent>, IEnumerable

The MultipartContent type exposes the following members.

Constructors

  Name Description
Public method MultipartContent() Initializes a new instance of the MultipartContent class.
Public method MultipartContent(String) Initializes a new instance of the MultipartContent class.
Public method MultipartContent(String, String) Initializes a new instance of the MultipartContent class.

Top

Properties

  Name Description
Public property Headers Gets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)

Top

Methods

  Name Description
Public method Add
Public method CopyToAsync(Stream) Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public method CopyToAsync(Stream, TransportContext) Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected method CreateContentReadStreamAsync (Inherited from HttpContent.)
Public method Dispose() Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected method Dispose(Boolean) (Overrides HttpContent.Dispose(Boolean).)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method LoadIntoBufferAsync() Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public method LoadIntoBufferAsync(Int64) (Inherited from HttpContent.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ReadAsByteArrayAsync (Inherited from HttpContent.)
Public method ReadAsStreamAsync (Inherited from HttpContent.)
Public method ReadAsStringAsync (Inherited from HttpContent.)
Protected method SerializeToStreamAsync (Overrides HttpContent.SerializeToStreamAsync(Stream, TransportContext).)
Public method ToString (Inherited from Object.)
Protected method TryComputeLength (Overrides HttpContent.TryComputeLength(Int64).)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Net.Http Namespace