[NUI] Change GetDefaultWindow() to static func (#900)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / XamlBinding / TypeConverter.cs
1 using System;
2 using System.ComponentModel;
3 using System.Globalization;
4
5 namespace Tizen.NUI.Binding
6 {
7     /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
8     [EditorBrowsable(EditorBrowsableState.Never)]
9     public abstract class TypeConverter
10     {
11         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
12         [EditorBrowsable(EditorBrowsableState.Never)]
13         public virtual bool CanConvertFrom(Type sourceType)
14         {
15             if (sourceType == null)
16                 throw new ArgumentNullException(nameof(sourceType));
17
18             return sourceType == typeof(string);
19         }
20
21         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
22         [EditorBrowsable(EditorBrowsableState.Never)]
23         [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")]
24         public virtual object ConvertFrom(object o)
25         {
26             return null;
27         }
28
29         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
30         [EditorBrowsable(EditorBrowsableState.Never)]
31         [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")]
32         public virtual object ConvertFrom(CultureInfo culture, object o)
33         {
34             return null;
35         }
36
37         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         public virtual object ConvertFromInvariantString(string value)
40         {
41 #pragma warning disable 0618 // retain until ConvertFrom removed
42             return ConvertFrom(CultureInfo.InvariantCulture, value);
43 #pragma warning restore
44         }
45     }
46 }