summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/BindingBaseExtensions.cs
blob: a52c5cb11169660e5aedc2997b50356f1dd74080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;

namespace Xamarin.Forms
{
	internal static class BindingBaseExtensions
	{
		internal static BindingMode GetRealizedMode(this BindingBase self, BindableProperty property)
		{
			if (self == null)
				throw new ArgumentNullException("self");
			if (property == null)
				throw new ArgumentNullException("property");

			return self.Mode != BindingMode.Default ? self.Mode : property.DefaultBindingMode;
		}
	}
}