summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Build.Tasks/NodeILExtensions.cs')
-rw-r--r--Xamarin.Forms.Build.Tasks/NodeILExtensions.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
index 97b48a40..35016694 100644
--- a/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
+++ b/Xamarin.Forms.Build.Tasks/NodeILExtensions.cs
@@ -220,7 +220,10 @@ namespace Xamarin.Forms.Build.Tasks
return true;
}
- var getters = bpRef.DeclaringType.GetMethods(md => md.Name == "Get" + pName && md.IsStatic, module).SingleOrDefault();
+ var getters = bpRef.DeclaringType.GetMethods(md => md.Name == "Get" + pName &&
+ md.IsStatic &&
+ md.Parameters.Count() == 1 &&
+ md.Parameters[0].ParameterType.FullName == "Xamarin.Forms.BindableObject", module).SingleOrDefault();
if (getters != null)
{
if (getters.Item1.HasCustomAttributes)
@@ -263,7 +266,10 @@ namespace Xamarin.Forms.Build.Tasks
//Then check for getter or setter (attached BPs)
var getters =
- bpRef.DeclaringType.GetMethods(md => md.Name == "Get" + name && md.IsStatic, context.Body.Method.Module)
+ bpRef.DeclaringType.GetMethods(md => md.Name == "Get" + name &&
+ md.IsStatic &&
+ md.Parameters.Count() == 1 &&
+ md.Parameters [0].ParameterType.FullName == "Xamarin.Forms.BindableObject", context.Body.Method.Module)
.SingleOrDefault();
if (getters != null)
return getters.Item1.ReturnType;