summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Internals/EffectUtilities.cs
blob: 4fd1b73d707be1f0182782e18b494e7c35eaa8cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
namespace Xamarin.Forms.Internals
{
	public static class EffectUtilities
	{
		public static void RegisterEffectControlProvider(IEffectControlProvider self, IElementController oldElement, IElementController newElement)
		{
			IElementController controller = oldElement;
			if (controller != null && controller.EffectControlProvider == self)
				controller.EffectControlProvider = null;

			controller = newElement;
			if (controller != null)
				controller.EffectControlProvider = self;
		}
	}
}