[NUI] Rebase develnui (DevelNUI only patches --> master) (#3910)
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Devel.Tests.Ubuntu / nunit.framework / Interfaces / ITypeInfo.cs
1 // ***********************************************************************
2 // Copyright (c) 2015 Charlie Poole
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 // 
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 // 
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // ***********************************************************************
23 #define PORTABLE
24 #define TIZEN
25 #define NUNIT_FRAMEWORK
26 #define NUNITLITE
27 #define NET_4_5
28 #define PARALLEL
29 using System;
30 using System.Reflection;
31 using NUnit.Compatibility;
32
33 namespace NUnit.Framework.Interfaces
34 {
35     /// <summary>
36     /// The ITypeInfo interface is an abstraction of a .NET Type
37     /// </summary>
38     public interface ITypeInfo : IReflectionInfo
39     {
40         #region Properties
41
42         /// <summary>
43         /// Gets the underlying Type on which this ITypeInfo is based
44         /// </summary>
45         Type Type { get; }
46
47         /// <summary>
48         /// Gets the base type of this type as an ITypeInfo
49         /// </summary>
50         ITypeInfo BaseType { get; }
51
52         /// <summary>
53         /// Returns true if the Type wrapped is equal to the argument
54         /// </summary>
55         bool IsType(Type type);
56
57         /// <summary>
58         /// Gets the Name of the Type
59         /// </summary>
60         string Name { get; }
61
62         /// <summary>
63         /// Gets the FullName of the Type
64         /// </summary>
65         string FullName { get; }
66
67         /// <summary>
68         /// Gets the assembly in which the type is declared
69         /// </summary>
70         Assembly Assembly { get; }
71
72         /// <summary>
73         /// Gets the Namespace of the Type
74         /// </summary>
75         string Namespace { get; }
76
77         /// <summary>
78         /// Gets a value indicating whether the type is abstract.
79         /// </summary>
80         bool IsAbstract { get; }
81
82         /// <summary>
83         /// Gets a value indicating whether the Type is a generic Type
84         /// </summary>
85         bool IsGenericType { get; }
86
87         /// <summary>
88         /// Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types.
89         /// </summary>
90         bool ContainsGenericParameters { get; }
91
92         /// <summary>
93         /// Gets a value indicating whether the Type is a generic Type definition
94         /// </summary>
95         bool IsGenericTypeDefinition { get; }
96
97         /// <summary>
98         /// Gets a value indicating whether the type is sealed.
99         /// </summary>
100         bool IsSealed { get; }
101
102         /// <summary>
103         /// Gets a value indicating whether this type is a static class.
104         /// </summary>
105         bool IsStaticClass { get; }
106
107         #endregion
108
109         #region Methods
110
111         /// <summary>
112         /// Get the display name for this typeInfo.
113         /// </summary>
114         string GetDisplayName();
115
116         /// <summary>
117         /// Get the display name for an oject of this type, constructed with specific arguments
118         /// </summary>
119         string GetDisplayName(object[] args);
120
121         /// <summary>
122         /// Returns a Type representing a generic type definition from which this Type can be constructed.
123         /// </summary>
124         Type GetGenericTypeDefinition();
125
126         /// <summary>
127         /// Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments
128         /// </summary>
129         ITypeInfo MakeGenericType(Type[] typeArgs);
130
131         /// <summary>
132         /// Returns a value indicating whether this type has a method with a specified public attribute
133         /// </summary>
134         bool HasMethodWithAttribute(Type attrType);
135
136         /// <summary>
137         /// Returns an array of IMethodInfos for methods of this Type
138         /// that match the specified flags.
139         /// </summary>
140         IMethodInfo[] GetMethods(BindingFlags flags);
141
142         /// <summary>
143         /// Gets the public constructor taking the specified argument Types
144         /// </summary>
145         ConstructorInfo GetConstructor(Type[] argTypes);
146
147         /// <summary>
148         /// Returns a value indicating whether this Type has a public constructor taking the specified argument Types.
149         /// </summary>
150         bool HasConstructor(Type[] argTypes);
151
152         /// <summary>
153         /// Construct an object of this Type, using the specified arguments.
154         /// </summary>
155         object Construct(object[] args);
156
157         #endregion
158     }
159 }