語言

DataServiceContext.BeginGetReadStream 方法

定義

非同步取得指定實體的二進位屬性資料,作為資料流,並附上指定的訊息標頭。

public:
 IAsyncResult ^ BeginGetReadStream(System::Object ^ entity, System::Data::Services::Client::DataServiceRequestArgs ^ args, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginGetReadStream(object entity, System.Data.Services.Client.DataServiceRequestArgs args, AsyncCallback callback, object state);
member this.BeginGetReadStream : obj * System.Data.Services.Client.DataServiceRequestArgs * AsyncCallback * obj -> IAsyncResult
Public Function BeginGetReadStream (entity As Object, args As DataServiceRequestArgs, callback As AsyncCallback, state As Object) As IAsyncResult

參數

entity
Object

具有二元屬性可取回的實體。

args
DataServiceRequestArgs

包含 HTTP 請求訊息設定的類別實例 DataServiceRequestArgs 。

callback
AsyncCallback

當結果可供客戶使用時,授權執行。

state
Object

使用者定義的狀態物件傳遞給回調。

傳回

一個 IAsyncResult 用來追蹤非同步操作狀態的物件。

例外狀況

提供給方法的任何參數皆為 null。

不 entity 被追蹤 DataServiceContext。

-或-

entity它就在該Added州。

-或-

這 entity 不是媒體連結條目,也沒有二元屬性。

備註

該 GetReadStream 方法非同步請求包含所 entity請求 的二進位屬性的資料串流。

在 AtomPub 協定中,是 entity 媒體連結條目,二進位屬性是相關的媒體資源。

對於設定在 args中的標頭,則不會進行任何驗證。 因此,不要以改變請求意義的方式更改 HTTP 標頭。

適用於