DataServiceContext.BeginLoadProperty 方法 (Object, String, Uri, AsyncCallback, Object)
透過使用提供的下一個連結 URI,以非同步方式從資料服務載入一頁相關實體。
命名空間: System.Data.Services.Client
組件: Microsoft.Data.Services.Client (在 Microsoft.Data.Services.Client.dll 中)
語法
'宣告
Public Function BeginLoadProperty ( _
entity As Object, _
propertyName As String, _
nextLinkUri As Uri, _
callback As AsyncCallback, _
state As Object _
) As IAsyncResult
'用途
Dim instance As DataServiceContext
Dim entity As Object
Dim propertyName As String
Dim nextLinkUri As Uri
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginLoadProperty(entity, _
propertyName, nextLinkUri, callback, _
state)
public IAsyncResult BeginLoadProperty(
Object entity,
string propertyName,
Uri nextLinkUri,
AsyncCallback callback,
Object state
)
public:
IAsyncResult^ BeginLoadProperty(
Object^ entity,
String^ propertyName,
Uri^ nextLinkUri,
AsyncCallback^ callback,
Object^ state
)
member BeginLoadProperty :
entity:Object *
propertyName:string *
nextLinkUri:Uri *
callback:AsyncCallback *
state:Object -> IAsyncResult
public function BeginLoadProperty(
entity : Object,
propertyName : String,
nextLinkUri : Uri,
callback : AsyncCallback,
state : Object
) : IAsyncResult
參數
- entity
型別:System.Object
包含要載入之屬性的實體。
- propertyName
型別:System.String
要載入的指定之實體的屬性名稱。
- nextLinkUri
型別:System.Uri
用於載入下一個結果頁的 URI。
- callback
型別:System.AsyncCallback
有結果可供用戶端使用時要叫用的方法。
- state
型別:System.Object
傳遞至回呼的使用者定義狀態物件。
傳回值
型別:System.IAsyncResult
用於追蹤非同步作業之狀態的 IAsyncResult 物件。
備註
當 entity 處於 Unchanged 或 Modified 狀態時,相關實體是以 Unchanged 狀態載入,而且實體之間的連結也是以 Unchanged 狀態建立。
當 entity 處於 Deleted 狀態時,相關實體是以 Unchanged 狀態載入,而實體之間的連結則是以 Deleted 狀態建立。