зеркало из https://github.com/microsoft/winsdkfb.git
CurrentDataString
This commit is contained in:
Родитель
fc12316e96
Коммит
d781b16514
|
@ -40,6 +40,7 @@ FBPaginatedArray::FBPaginatedArray(
|
|||
winsdkfb::FBJsonClassFactory^ ObjectFactory
|
||||
) :
|
||||
_current(nullptr),
|
||||
_currentDataString(nullptr),
|
||||
_request(Request),
|
||||
_parameters(Parameters),
|
||||
_objectFactory(ObjectFactory)
|
||||
|
@ -94,6 +95,18 @@ IVectorView<Object^>^ FBPaginatedArray::Current::get()
|
|||
return _current;
|
||||
}
|
||||
|
||||
String^ FBPaginatedArray::CurrentDataString::get()
|
||||
{
|
||||
IVectorView<Object^>^ result = nullptr;
|
||||
|
||||
if (!HasCurrent)
|
||||
{
|
||||
throw ref new InvalidArgumentException(SDKMessageBadCall);
|
||||
}
|
||||
|
||||
return _currentDataString;
|
||||
}
|
||||
|
||||
bool FBPaginatedArray::HasCurrent::get()
|
||||
{
|
||||
return (_current != nullptr);
|
||||
|
@ -176,6 +189,7 @@ FBResult^ FBPaginatedArray::ConsumePagedResponse(
|
|||
SDKMessageBadObject);
|
||||
}
|
||||
|
||||
_currentDataString = it->Current->Value->ToString();
|
||||
_current = ObjectArrayFromJsonArray(
|
||||
it->Current->Value->GetArray(), _objectFactory);
|
||||
if (_current)
|
||||
|
|
|
@ -110,6 +110,23 @@ namespace winsdkfb
|
|||
Windows::Foundation::Collections::IVectorView<Object^>^ get();
|
||||
}
|
||||
|
||||
/**
|
||||
* The current collection of objects that were returned by a call
|
||||
* to FirstAsync, NextAsync, or PreviousAsync. This is the raw string
|
||||
* of the "data" value.
|
||||
*/
|
||||
property Platform::String^
|
||||
CurrentDataString
|
||||
{
|
||||
/**
|
||||
* Gets the current collection of objects from the most recently
|
||||
* queried page, in the raw string format.
|
||||
* @exception InvalidArgumentException if no page is the current page.
|
||||
* @returnPlatform::String^ of the data
|
||||
*/
|
||||
Platform::String^ get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if the Graph call successfully returned a page of data
|
||||
* that was successfully converted by ObjectFactory.
|
||||
|
@ -150,6 +167,7 @@ namespace winsdkfb
|
|||
Platform::String^ path
|
||||
);
|
||||
|
||||
Platform::String^ _currentDataString;
|
||||
Windows::Foundation::Collections::IVectorView<Object^>^ _current;
|
||||
FBPaging^ _paging;
|
||||
Platform::String^ _request;
|
||||
|
|
Загрузка…
Ссылка в новой задаче