Performing asynchronous queries
The Windows Azure Storage Client library uses the common language runtime (CLR) Asynchronous Programming Model to provide asynchronous versions of nearly all the methods that access Windows Azure Storage Service. The asynchronous methods that download lists (entities, tables, and so on) typically come in a matched pair named BeginRequestSegmented()
and EndRequestSegmented()
where Request
indicates the specific request and the Segmented
suffix indicates that the results are returned as a result segment which may not contain the complete result set. Essentially, these methods page through the data one result segment at a time.
The CloudTableQuery<T>
class exposes the BeginExecuteSegmented()
and EndExecuteSegmented()
methods to implement query execute functionality. BeginExecuteSegmented()
takes a parameter specifying the callback method in which EndExecuteSegmented()
must be called to clean up resources used in the asynchronous call. The code can be simplified...