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

Commit 3d1c0bc

Browse files
committed
Fix PCL build
1 parent 981de0f commit 3d1c0bc

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/ServiceStack.Text/Common/WriteType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static Func<T, bool> GetShouldSerializeMethod(MemberInfo member)
110110

111111
static Func<T, string, bool?> ShouldSerialize(Type type)
112112
{
113-
var method = type.GetMethod("ShouldSerialize", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new[] { typeof(string) }, null);
113+
var method = type.GetMethodInfo("ShouldSerialize");
114114
return (method == null || method.ReturnType != typeof(bool?))
115115
? null
116116
: (Func<T, string, bool?>)Delegate.CreateDelegate(typeof(Func<T, string, bool?>), method);

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ public static PropertyInfo[] GetSerializableProperties(this Type type)
669669

670670
public static Func<object, string, object, object> GetOnDeserializing<T>()
671671
{
672-
var method = typeof(T).GetMethod("OnDeserializing", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new[] { typeof(string), typeof(object) }, null);
673-
if (method == null || method.ReturnType != typeof (object))
672+
var method = typeof(T).GetMethodInfo("OnDeserializing");
673+
if (method == null || method.ReturnType != typeof(object))
674674
return null;
675675
var obj = (Func<T, string, object, object>)Delegate.CreateDelegate(typeof(Func<T, string, object, object>), method);
676676
return (instance, memberName, value) => obj((T)instance, memberName, value);

tests/ServiceStack.Text.Tests/AutoMappingTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ public void Does_convert_models_with_collections()
483483
Assert.That(MatchesUsers(hashset, from.Collection.ConvertTo<HashSet<User>>()));
484484
}
485485

486-
487486
public class Customer
488487
{
489488
public CompanyInfo CompanyInfo { get; set; }

0 commit comments

Comments
 (0)