[NUI] Rebase develnui (DevelNUI only patches --> master) (#3910)
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Devel.Tests.Ubuntu / nunit.framework / Interfaces / IMethodInfo.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
32 namespace NUnit.Framework.Interfaces
33 {
34     /// <summary>
35     /// The IMethodInfo class is used to encapsulate information
36     /// about a method in a platform-independent manner.
37     /// </summary>
38     public interface IMethodInfo : IReflectionInfo
39     {
40         #region Properties
41
42         /// <summary>
43         /// Gets the Type from which this method was reflected.
44         /// </summary>
45         ITypeInfo TypeInfo { get; }
46
47         /// <summary>
48         /// Gets the MethodInfo for this method.
49         /// </summary>
50         MethodInfo MethodInfo { get; }
51
52         /// <summary>
53         /// Gets the name of the method.
54         /// </summary>
55         string Name { get; }
56
57         /// <summary>
58         /// Gets a value indicating whether the method is abstract.
59         /// </summary>
60         bool IsAbstract { get; }
61
62         /// <summary>
63         /// Gets a value indicating whether the method is public.
64         /// </summary>
65         bool IsPublic { get; }
66
67         /// <summary>
68         /// Gets a value indicating whether the method contains unassigned generic type parameters.
69         /// </summary>
70         bool ContainsGenericParameters { get; }
71
72         /// <summary>
73         /// Gets a value indicating whether the method is a generic method.
74         /// </summary>
75         bool IsGenericMethod { get; }
76
77         /// <summary>
78         /// Gets a value indicating whether the MethodInfo represents the definition of a generic method.
79         /// </summary>
80         bool IsGenericMethodDefinition { get; }
81
82         /// <summary>
83         /// Gets the return Type of the method.
84         /// </summary>
85         ITypeInfo ReturnType { get; }
86
87         #endregion
88
89         #region Methods
90
91         /// <summary>
92         /// Gets the parameters of the method.
93         /// </summary>
94         /// <returns></returns>
95         IParameterInfo[] GetParameters();
96
97         /// <summary>
98         /// Returns the Type arguments of a generic method or the Type parameters of a generic method definition.
99         /// </summary>
100         Type[] GetGenericArguments();
101
102         /// <summary>
103         /// Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo.
104         /// </summary>
105         /// <param name="typeArguments">The type arguments to be used</param>
106         /// <returns>A new IMethodInfo with the type arguments replaced</returns>
107         IMethodInfo MakeGenericMethod(params Type[] typeArguments);
108
109         /// <summary>
110         /// Invokes the method, converting any TargetInvocationException to an NUnitException.
111         /// </summary>
112         /// <param name="fixture">The object on which to invoke the method</param>
113         /// <param name="args">The argument list for the method</param>
114         /// <returns>The return value from the invoked method</returns>
115         object Invoke(object fixture, params object[] args);
116
117         #endregion
118     }
119 }