FBClient::SerializeParameters uses ToString() as a backup

This commit is contained in:
Austin Diviness 2016-06-28 12:32:31 -07:00
Родитель 844cace300
Коммит 5ff22dfbff
3 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -210,14 +210,14 @@
<ItemGroup>
<PRIResource Include="Resources.resw" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\winsdkfb\winsdkfb_testing_key.pfx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\winsdkfb\winsdkfb_uwp\winsdkfb_uwp\winsdkfb_uwp.vcxproj">
<Project>{973a943b-ff77-4267-8f30-f5fe2b7f5583}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\winsdkfb\winsdkfb_testing_key.pfx" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

Просмотреть файл

@ -34,7 +34,6 @@
<ClCompile Include="FBPageBindable.cpp" />
<ClCompile Include="UserInfo.xaml.cpp" />
<ClCompile Include="UserLikes.xaml.cpp" />
<ClCompile Include="OptionsPage.xaml.cpp" />
<ClCompile Include="Dialogs.xaml.cpp" />
</ItemGroup>
<ItemGroup>
@ -47,7 +46,6 @@
<ClInclude Include="FBPageBindable.h" />
<ClInclude Include="UserInfo.xaml.h" />
<ClInclude Include="UserLikes.xaml.h" />
<ClInclude Include="OptionsPage.xaml.h" />
<ClInclude Include="Dialogs.xaml.h" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -654,8 +654,12 @@ void FBClient::SerializeParameters(
auto item = keysThatAreNotString->First();
while (item->HasCurrent)
{
// TODO: Jsonize the object value
String^ newValue = dynamic_cast<String^>(parameters->Lookup(item->Current));
Object^ val = parameters->Lookup(item->Current);
String^ newValue = dynamic_cast<String^>(val);
if (!newValue)
{
newValue = val->ToString();
}
// Replace the existing object with the new Jsonized value
parameters->Remove(item->Current);