baee6f12cbb6b22d0b1b6006ad3b0c8d022b0c74
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / XamlBinding / XmlnsDefinitionAttribute.cs
1 using System;
2 using System.Diagnostics;
3 using System.ComponentModel;
4
5 namespace Tizen.NUI
6 {
7     /// <summary>
8     /// Specifies a mapping on a per-assembly basis between a XAML namespace and a CLR namespace,<br />
9     /// which is then used for type resolution by a XAML object writer or XAML schema context.
10     /// </summary>
11     /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
12     [EditorBrowsable(EditorBrowsableState.Never)]
13     [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
14     [DebuggerDisplay("{XmlNamespace}, {ClrNamespace}, {AssemblyName}")]
15     public sealed class XmlnsDefinitionAttribute : Attribute
16     {
17         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
18         [EditorBrowsable(EditorBrowsableState.Never)]
19         public string XmlNamespace { get; }
20
21         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
22         [EditorBrowsable(EditorBrowsableState.Never)]
23         public string ClrNamespace { get; }
24
25         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
26         [EditorBrowsable(EditorBrowsableState.Never)]
27         public string AssemblyName { get; set; }
28
29         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
30         [EditorBrowsable(EditorBrowsableState.Never)]
31         public XmlnsDefinitionAttribute(string xmlNamespace, string clrNamespace)
32         {
33             if (xmlNamespace == null)
34                 throw new ArgumentNullException(nameof(xmlNamespace));
35             if (clrNamespace == null)
36                 throw new ArgumentNullException(nameof(clrNamespace));
37
38             ClrNamespace = clrNamespace;
39             XmlNamespace = xmlNamespace;
40         }
41     }
42 }