Share via


DataServiceContext.BeginLoadProperty 方法

定义

开始从数据服务加载指定属性值的操作。

重载

BeginLoadProperty(Object, String, AsyncCallback, Object)

从数据服务异步加载指定属性的值。

BeginLoadProperty(Object, String, DataServiceQueryContinuation, AsyncCallback, Object)

通过使用所提供的查询延续对象,从数据服务异步加载下一页相关实体。

BeginLoadProperty(Object, String, Uri, AsyncCallback, Object)

通过使用所提供的下一链接 URI,从数据服务异步加载相关实体页。

BeginLoadProperty(Object, String, AsyncCallback, Object)

从数据服务异步加载指定属性的值。

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, callback As AsyncCallback, state As Object) As IAsyncResult

参数

entity
Object

包含要加载的属性的实体。

propertyName
String

要加载的指定实体上的属性名称。

callback
AsyncCallback

收到请求响应时所调用的委托。

state
Object

用户定义的状态对象,用于将上下文数据传递给回调方法。

返回

表示异步操作状态的 IAsyncResult

注解

调用此方法时,将调用网络操作来检索属性的值。 指定的属性可以是实体的任一属性,包括表示关联或链接的属性。 如果属性是表示关联、链接或延迟的属性,则调用此方法时,会向客户端提供延迟加载相关资源的方式。 如果实体处于已修改状态,则属性值将加载相关实体,并将这些实体及任何链接标记为“未更改”。

如果已加载属性,则调用此方法可让您刷新该属性的值。

适用于

BeginLoadProperty(Object, String, DataServiceQueryContinuation, AsyncCallback, Object)

通过使用所提供的查询延续对象,从数据服务异步加载下一页相关实体。

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, System::Data::Services::Client::DataServiceQueryContinuation ^ continuation, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, System.Data.Services.Client.DataServiceQueryContinuation continuation, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * System.Data.Services.Client.DataServiceQueryContinuation * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, continuation As DataServiceQueryContinuation, callback As AsyncCallback, state As Object) As IAsyncResult

参数

entity
Object

包含要加载的属性的实体。

propertyName
String

要加载的指定实体的属性名称。

continuation
DataServiceQueryContinuation

DataServiceQueryContinuation<T> 对象,表示要从数据服务返回的下一页相关实体数据。

callback
AsyncCallback

当结果可供客户端使用时将调用的委托。

state
Object

已传递到回调的用户定义的状态对象。

返回

表示操作状态的 IAsyncResult

注解

所提供的 DataServiceQueryContinuation<T> 对象所包含的 URI 在执行时会返回查询结果中的下一页数据。

适用于

BeginLoadProperty(Object, String, Uri, AsyncCallback, Object)

通过使用所提供的下一链接 URI,从数据服务异步加载相关实体页。

public:
 IAsyncResult ^ BeginLoadProperty(System::Object ^ entity, System::String ^ propertyName, Uri ^ nextLinkUri, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginLoadProperty (object entity, string propertyName, Uri nextLinkUri, AsyncCallback callback, object state);
member this.BeginLoadProperty : obj * string * Uri * AsyncCallback * obj -> IAsyncResult
Public Function BeginLoadProperty (entity As Object, propertyName As String, nextLinkUri As Uri, callback As AsyncCallback, state As Object) As IAsyncResult

参数

entity
Object

包含要加载的属性的实体。

propertyName
String

要加载的指定实体的属性名称。

nextLinkUri
Uri

用于加载下一结果页的 URI。

callback
AsyncCallback

当结果可供客户端使用时将调用的委托。

state
Object

已传递到回调的用户定义的状态对象。

返回

用于跟踪异步操作状态的 IAsyncResult 对象。

注解

entity 处于 UnchangedModified 状态时,在 Unchanged 状态下加载相关实体,并且也在 Unchanged 状态下创建各实体之间的链接。

entity 处于 Deleted 状态时,在 Unchanged 状态下加载相关实体,并在 Deleted 状态下创建各实体之间的链接。

适用于