Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 41f6e7f

Browse files
committed
Merge pull request #323 from uhaciogullari/winrt-fix
WinRT build fix
2 parents 15dfd14 + 5019b89 commit 41f6e7f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/ServiceStack.Text/Common/WriteType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public static void WriteQueryString(TextWriter writer, object value)
331331

332332
var isEnumerable = propertyValue != null
333333
&& !(propertyValue is string)
334-
&& !(propertyValue.GetType().IsValueType)
334+
&& !(propertyValue.GetType().IsValueType())
335335
&& propertyValue.GetType().HasInterface(typeof(IEnumerable));
336336

337337
if (!isEnumerable)

src/ServiceStack.Text/JsConfig.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,13 @@ public static void Reset(Type cachesForType)
504504

505505
internal static void InvokeReset(this Type genericType)
506506
{
507+
#if NETFX_CORE
508+
MethodInfo methodInfo = genericType.GetTypeInfo().GetType().GetMethodInfo("Reset");
509+
methodInfo.Invoke(null, null);
510+
#else
507511
var methodInfo = genericType.GetMethod("Reset", BindingFlags.Static | BindingFlags.Public);
508512
methodInfo.Invoke(null, null);
513+
#endif
509514
}
510515

511516
#if MONOTOUCH

src/ServiceStack.Text/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public static bool StartsWithIgnoreCase(this string text, string startsWith)
491491
{
492492
#if NETFX_CORE
493493
return text != null
494-
&& text.StartsWith(endsWith, StringComparison.CurrentCultureIgnoreCase);
494+
&& text.StartsWith(startsWith, StringComparison.CurrentCultureIgnoreCase);
495495
#else
496496
return text != null
497497
&& text.StartsWith(startsWith, StringComparison.InvariantCultureIgnoreCase);

0 commit comments

Comments
 (0)