Udostępnij za pośrednictwem


DataServiceCollection<T>.LoadNextPartialSetAsync Method

Loads the next page of data into the collection.

Supported only by the WCF Data Services 5.0 client for Silverlight.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client.SL (in Microsoft.Data.Services.Client.SL.dll)

Syntax

'Declaration
Public Function LoadNextPartialSetAsync As Boolean
'Usage
Dim instance As DataServiceCollection 
Dim returnValue As Boolean 

returnValue = instance.LoadNextPartialSetAsync()
public bool LoadNextPartialSetAsync()
public:
bool LoadNextPartialSetAsync()
member LoadNextPartialSetAsync : unit -> bool
public function LoadNextPartialSetAsync() : boolean

Return Value

Type: System.Boolean
A Boolean value that is true when the DataServiceCollection<T> has a continuation token; otherwise false.

Remarks

The LoadNextPartialSetAsync method only returns true and loads the next page of data when paging is enabled in the data service and when a continuation token can be accessed from the Continuation property. When the Continuation property is nulla null reference (Nothing in Visual Basic), a request is not sent to the data service. For more information, see Creating the Northwind Data Service (WCF Data Services/Silverlight).

Because the LoadNextPartialSetAsync method is asynchronous, the method returns before a response to the data service is received. You must handle the LoadCompleted event to access the QueryOperationResponse<T> that contains information about the result of the load operation. Items are loaded into the collection when the load operation is complete, whether or not the LoadCompleted event is handled.

The LoadNextPartialSetAsync method can be called only once on the UI thread. The method cannot be called again until after the LoadCompleted event is raised. The LoadCompleted event is raised whether or not the query succeeds.

See Also

Reference

DataServiceCollection<T> Class

System.Data.Services.Client Namespace