summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/OnPlatform.cs
blob: 02e27083dfa34b622ecee1f98272e67d88d25d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
namespace Xamarin.Forms
{
	public class OnPlatform<T>
	{
		public T Android { get; set; }
		public T iOS { get; set; }
		public T WinPhone { get; set; }

		public T Tizen { get; set; }

		public static implicit operator T(OnPlatform<T> onPlatform)
		{
			return Device.OnPlatform(iOS: onPlatform.iOS, Android: onPlatform.Android, WinPhone: onPlatform.WinPhone, Tizen: onPlatform.Tizen);
		}
	}
}