Skip to content

Commit 8cd9e0e

Browse files
tofutimoysteinkrog
authored andcommitted
GetString is a bit different in WINRT and WINDOWS_PHONE
1 parent b029393 commit 8cd9e0e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/BlobSerializationTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,11 @@ public void SavesUnsupportedTypes()
332332
{
333333
if (t == typeof(DivideByZeroException))
334334
{
335+
#if __WINRT__ || WINDOWS_PHONE
336+
var json = Encoding.UTF8.GetString(d, 0, d.Length);
337+
#else
335338
var json = Encoding.UTF8.GetString(d);
339+
#endif
336340
var result = JsonConvert.DeserializeObject<DivideByZeroException>(json);
337341
return result;
338342
}

0 commit comments

Comments
 (0)