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

namespace Xamarin.Forms.Internals
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	[DebuggerDisplay("{XmlNamespace}, {ClrNamespace}, {AssemblyName}")]
	sealed class XmlnsDefinitionAttribute : Attribute
	{
		public string XmlNamespace { get; }
		public string ClrNamespace { get; }
		public string AssemblyName { get; set; }

		public XmlnsDefinitionAttribute(string xmlNamespace, string clrNamespace)
		{
			if (xmlNamespace == null)
				throw new ArgumentNullException(nameof(xmlNamespace));
			if (clrNamespace == null)
				throw new ArgumentNullException(nameof(clrNamespace));

			ClrNamespace = clrNamespace;
			XmlNamespace = xmlNamespace;
		}
	}
}