MultipartContent MultipartContent MultipartContent MultipartContent Class

定義

提供使用 multipart/* 內容類型規格進行序列化之 HttpContent 物件的集合。Provides a collection of HttpContent objects that get serialized using the multipart/* content type specification.

public ref class MultipartContent : System::Net::Http::HttpContent, System::Collections::Generic::IEnumerable<System::Net::Http::HttpContent ^>
public class MultipartContent : System.Net.Http.HttpContent, System.Collections.Generic.IEnumerable<System.Net.Http.HttpContent>
type MultipartContent = class
    inherit HttpContent
    interface seq<HttpContent>
    interface IEnumerable
Public Class MultipartContent
Inherits HttpContent
Implements IEnumerable(Of HttpContent)
繼承
MultipartContentMultipartContentMultipartContentMultipartContent
衍生
實作

建構函式

MultipartContent() MultipartContent() MultipartContent() MultipartContent()

建立 MultipartContent 類別的新執行個體。Creates a new instance of the MultipartContent class.

MultipartContent(String) MultipartContent(String) MultipartContent(String) MultipartContent(String)

建立 MultipartContent 類別的新執行個體。Creates a new instance of the MultipartContent class.

MultipartContent(String, String) MultipartContent(String, String) MultipartContent(String, String) MultipartContent(String, String)

建立 MultipartContent 類別的新執行個體。Creates a new instance of the MultipartContent class.

方法

Add(HttpContent) Add(HttpContent) Add(HttpContent) Add(HttpContent)

將多重部分 HTTP 內容加入至使用 multipart/* 內容類型規格進行序列化之 HttpContent 物件的集合。Add multipart HTTP content to a collection of HttpContent objects that get serialized using the multipart/* content type specification.

CopyToAsync(Stream) CopyToAsync(Stream) CopyToAsync(Stream) CopyToAsync(Stream)

將 HTTP 內容序列化成位元組資料流,然後複製到 stream 參數所提供的資料流物件。Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.

(Inherited from HttpContent)
CopyToAsync(Stream, TransportContext) CopyToAsync(Stream, TransportContext) CopyToAsync(Stream, TransportContext) CopyToAsync(Stream, TransportContext)

將 HTTP 內容序列化成位元組資料流,然後複製到 stream 參數所提供的資料流物件。Serialize the HTTP content into a stream of bytes and copies it to the stream object provided as the stream parameter.

(Inherited from HttpContent)
CreateContentReadStreamAsync() CreateContentReadStreamAsync() CreateContentReadStreamAsync() CreateContentReadStreamAsync()

以非同步作業使用 multipart/* 編碼將 HTTP 內容序列化為資料流。Serializes the HTTP content to a stream using the multipart/* encoding as an asynchronous operation.

Dispose() Dispose() Dispose() Dispose()

釋放 Unmanaged 資源,並處置 HttpContent 所使用的 Managed 資源。Releases the unmanaged resources and disposes of the managed resources used by the HttpContent.

(Inherited from HttpContent)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 MultipartContent 所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。Releases the unmanaged resources used by the MultipartContent and optionally disposes of the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回列舉程式,逐一查看使用 multipart/* 內容類型規格進行序列化的 HttpContent 物件集合。Returns an enumerator that iterates through the collection of HttpContent objects that get serialized using the multipart/* content type specification.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
LoadIntoBufferAsync() LoadIntoBufferAsync() LoadIntoBufferAsync() LoadIntoBufferAsync()

以非同步作業方式將 HTTP 內容序列化至記憶體緩衝區。Serialize the HTTP content to a memory buffer as an asynchronous operation.

(Inherited from HttpContent)
LoadIntoBufferAsync(Int64) LoadIntoBufferAsync(Int64) LoadIntoBufferAsync(Int64) LoadIntoBufferAsync(Int64)

以非同步作業方式將 HTTP 內容序列化至記憶體緩衝區。Serialize the HTTP content to a memory buffer as an asynchronous operation.

(Inherited from HttpContent)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ReadAsByteArrayAsync() ReadAsByteArrayAsync() ReadAsByteArrayAsync() ReadAsByteArrayAsync()

以非同步作業方式將位元組陣列的 HTTP 內容序列化。Serialize the HTTP content to a byte array as an asynchronous operation.

(Inherited from HttpContent)
ReadAsStreamAsync() ReadAsStreamAsync() ReadAsStreamAsync() ReadAsStreamAsync()

以非同步作業方式將 HTTP 內容序列化,並傳回代表內容的資料流。Serialize the HTTP content and return a stream that represents the content as an asynchronous operation.

(Inherited from HttpContent)
ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync() ReadAsStringAsync()

以非同步作業方式將 HTTP 內容序列化為字串。Serialize the HTTP content to a string as an asynchronous operation.

(Inherited from HttpContent)
SerializeToStreamAsync(Stream, TransportContext) SerializeToStreamAsync(Stream, TransportContext) SerializeToStreamAsync(Stream, TransportContext) SerializeToStreamAsync(Stream, TransportContext)

以非同步作業方式將多部分 HTTP 內容序列化為資料流。Serialize the multipart HTTP content to a stream as an asynchronous operation.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryComputeLength(Int64) TryComputeLength(Int64) TryComputeLength(Int64) TryComputeLength(Int64)

判斷 HTTP 多部分內容是否具備有效的位元組長度。Determines whether the HTTP multipart content has a valid length in bytes.

明確介面實作

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

GetEnumerator() 方法的明確實作。The explicit implementation of the GetEnumerator() method.

屬性

Headers Headers Headers Headers

取得 HTTP 內容標頭,如 RFC 2616 中所定義。Gets the HTTP content headers as defined in RFC 2616.

(Inherited from HttpContent)

擴充方法

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

傳回包含來源集合中每個節點祖系的項目集合。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

傳回包含來源集合中每個節點祖系的已篩選項目集合。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

傳回包含來源集合中每個項目和文件之子代項目的項目集合。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

傳回已篩選的項目集合,其中包含來源集合中每個項目和文件的子代項目。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

傳回來源集合中每個項目和文件的子項目集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

傳回來源集合中每個項目和文件的已篩選子項目集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

傳回包含來源集合中所有節點的節點集合,依據文件順序來排序。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於