My Project  0.10.0
Windows SDK for Facebook
Public Member Functions | Properties | List of all members
winsdkfb::Graph::FBPaginatedArray Class Reference

#include <FacebookPaginatedArray.h>

Public Member Functions

 FBPaginatedArray (Platform::String^ Request, Windows::Foundation::Collections::PropertySet^ Parameters, winsdkfb::FBJsonClassFactory^ ObjectFactory)
 
Windows::Foundation::IAsyncOperation< FBResult^ >^ FirstAsync ()
 
Windows::Foundation::IAsyncOperation< FBResult^ >^ NextAsync ()
 
Windows::Foundation::IAsyncOperation< FBResult^ >^ PreviousAsync ()
 
Windows::Foundation::Collections::IVectorView< Object^ >^ ObjectArrayFromWebResponse (Platform::String^ Response, FBJsonClassFactory^ classFactory)
 

Properties

Windows::Foundation::Collections::IVectorView< Object^ >^ Current [get]
 
bool HasCurrent [get]
 
bool HasNext [get]
 
bool HasPrevious [get]
 

Detailed Description

Used to interact with Facebook Graph API calls that return paginated values.

Constructor & Destructor Documentation

FBPaginatedArray::FBPaginatedArray ( Platform::String^  Request,
Windows::Foundation::Collections::PropertySet^  Parameters,
winsdkfb::FBJsonClassFactory^  ObjectFactory 
)

Constructor.

Parameters
RequestThe Graph API endpoint
ParametersAdditional parameters that the Graph call may require
ObjectFactoryFactory to create object from the response data

Member Function Documentation

Windows::Foundation::IAsyncOperation< FBResult^ > FBPaginatedArray::FirstAsync ( )

Tries to get the first set of response objects from Facebook for the Graph API call. Sets Current to the same IVectorView that is returned by the FBResult on a successful call.

Exceptions
InvalidArgumentExceptionif ObjectFactory is unable to instantiate the object it creates from the JSON values returned from the Graph call.
Returns
FBResult object that encapsulates an IVectorView<Object^>^ where the Object^ can be cast to the object created by ObjectFactory, if call was successful.
Windows::Foundation::IAsyncOperation< FBResult^ > FBPaginatedArray::NextAsync ( )

Tries to get the next set of response objects from Facebook for the Graph API call. Sets Current to the same IVectorView that is returned by the FBResult on a successful call. Should only be called after FirstAsync has been called.

Exceptions
InvalidArgumentExceptionif the current page does not have a next page. This will also be be thrown if NextAsync is called before FirstAsync. This will also be thrown if ObjectFactory is unable to instantiate the object it creates from the JSON values returned from the Graph call.
Returns
FBResult object that encapsulates an IVectorView<Object^>^ where the Object^ can be cast to the object created by ObjectFactory, if call was successful.
Windows::Foundation::IAsyncOperation< FBResult^ > FBPaginatedArray::PreviousAsync ( )

Tries to get the previous set of response objects from Facebook for the Graph API call. Sets Current to the same IVectorView that is returned by the FBResult on a successful call. Should only be called after FirstAsync has been called.

Exceptions
InvalidArgumentExceptionif the current page does not have a previous page. This will also be be thrown if PreviousAsync is called before FirstAsync. This will also be thrown if ObjectFactory is unable to instantiate the object it creates from the JSON values returned from the Graph call.
Returns
FBResult object that encapsulates an IVectorView<Object^>^ where the Object^ can be cast to the object created by ObjectFactory, if call was successful.

Property Documentation

Windows:: Foundation:: Collections:: IVectorView< Object^>^ winsdkfb::Graph::FBPaginatedArray::Current
get

The current collection of objects that were returned by a call to FirstAsync, NextAsync, or PreviousAsync. The objects stored in the IVectorView will have the type of the objects created by ObjectFactory.

bool winsdkfb::Graph::FBPaginatedArray::HasCurrent
get

Indicates if the Graph call successfully returned a page of data that was successfully converted by ObjectFactory.


The documentation for this class was generated from the following files: