summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/DelegateLogListener.cs
blob: 20a0ab7645797e5680cc0949ce610bc81a5675b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;

namespace Xamarin.Forms
{
	internal class DelegateLogListener : LogListener
	{
		readonly Action<string, string> _log;

		public DelegateLogListener(Action<string, string> log)
		{
			if (log == null)
				throw new ArgumentNullException("log");

			_log = log;
		}

		public override void Warning(string category, string message)
		{
			_log(category, message);
		}
	}
}