Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MethodBuilderInstantiation.cs
Go to the documentation of this file.
3
5
7{
9
10 private Type[] m_inst;
11
13
14 public override string Name => m_method.Name;
15
17
19
20 public override Module Module => m_method.Module;
21
23 {
24 get
25 {
27 }
28 }
29
31
32 public override CallingConventions CallingConvention => m_method.CallingConvention;
33
34 public override bool IsGenericMethodDefinition => false;
35
36 public override bool ContainsGenericParameters
37 {
38 get
39 {
40 for (int i = 0; i < m_inst.Length; i++)
41 {
43 {
44 return true;
45 }
46 }
48 {
49 return true;
50 }
51 return false;
52 }
53 }
54
55 public override bool IsGenericMethod => true;
56
57 public override Type ReturnType => m_method.ReturnType;
58
60 {
61 get
62 {
63 throw new NotSupportedException();
64 }
65 }
66
68 {
69 get
70 {
71 throw new NotSupportedException();
72 }
73 }
74
75 internal static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst)
76 {
77 if (!method.IsGenericMethodDefinition)
78 {
79 throw new InvalidOperationException();
80 }
81 return new MethodBuilderInstantiation(method, inst);
82 }
83
85 {
86 m_method = method;
87 m_inst = inst;
88 }
89
90 internal override Type[] GetParameterTypes()
91 {
93 }
94
95 public override object[] GetCustomAttributes(bool inherit)
96 {
97 return m_method.GetCustomAttributes(inherit);
98 }
99
100 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
101 {
102 return m_method.GetCustomAttributes(attributeType, inherit);
103 }
104
105 public override bool IsDefined(Type attributeType, bool inherit)
106 {
107 return m_method.IsDefined(attributeType, inherit);
108 }
109
110 public override ParameterInfo[] GetParameters()
111 {
112 throw new NotSupportedException();
113 }
114
119
120 public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
121 {
122 throw new NotSupportedException();
123 }
124
125 public override Type[] GetGenericArguments()
126 {
127 return m_inst;
128 }
129
131 {
132 return m_method;
133 }
134
135 [RequiresUnreferencedCode("If some of the generic arguments are annotated (either with DynamicallyAccessedMembersAttribute, or generic constraints), trimming can't validate that the requirements of those annotations are met.")]
136 public override MethodInfo MakeGenericMethod(params Type[] arguments)
137 {
139 }
140
142 {
143 throw new NotSupportedException();
144 }
145}
override object[] GetCustomAttributes(Type attributeType, bool inherit)
override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
override MethodInfo MakeGenericMethod(params Type[] arguments)
override bool IsDefined(Type attributeType, bool inherit)
static MethodInfo MakeGenericMethod(MethodInfo method, Type[] inst)
bool IsDefined(Type attributeType, bool inherit)
object[] GetCustomAttributes(bool inherit)
virtual Type[] GetParameterTypes()
virtual bool IsGenericMethodDefinition
Definition MethodBase.cs:80
virtual CallingConventions CallingConvention
Definition MethodBase.cs:28
MethodAttributes Attributes
Definition MethodBase.cs:24
MethodImplAttributes GetMethodImplementationFlags()
override MemberTypes MemberType
Definition MethodInfo.cs:8
static string Arg_NotGenericMethodDefinition
Definition SR.cs:344
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string NotSupported_DynamicModule
Definition SR.cs:1672
Definition SR.cs:7
virtual bool ContainsGenericParameters
Definition Type.cs:336