|
94 | 94 | if (result)
|
95 | 95 | return result;
|
96 | 96 |
|
97 |
| - var parsedTypeName = JSIL.ParseTypeName("System.Reflection.MethodInfo"); |
| 97 | + var parsedTypeName = JSIL.ParseTypeName("System.Reflection.RuntimeMethodInfo"); |
98 | 98 | var infoType = JSIL.GetTypeInternal(parsedTypeName, $jsilcore, true);
|
99 | 99 | var info = JSIL.CreateInstanceOfType(infoType, null);
|
100 | 100 | info._typeObject = this._typeObject;
|
|
123 | 123 | }
|
124 | 124 | );
|
125 | 125 |
|
| 126 | + $.Method({ Public: true, Static: false }, "get_IsVirtual", |
| 127 | + new JSIL.MethodSignature($.Type, []), |
| 128 | + function get_IsGenericMethod() { |
| 129 | + return this._descriptor.Virtual; |
| 130 | + } |
| 131 | + ); |
| 132 | + |
126 | 133 | $.Method({ Public: true, Static: false }, "get_IsGenericMethodDefinition",
|
127 | 134 | new JSIL.MethodSignature($.Type, []),
|
128 | 135 | function get_IsGenericMethodDefinition() {
|
|
136 | 143 | return this.DeclaringType.get_ContainsGenericParameters() || (this._data.signature.genericArgumentNames.length !== 0 && this._data.signature.genericArgumentValues === undefined);
|
137 | 144 | }
|
138 | 145 | );
|
| 146 | + |
| 147 | + $.Method({ Static: false, Public: true }, "GetBaseDefinition", |
| 148 | + (new JSIL.MethodSignature($jsilcore.TypeRef("System.Reflection.MethodInfo"), [], [])), |
| 149 | + function getBaseDefinition() { |
| 150 | + var previous; |
| 151 | + var current = this; |
| 152 | + |
| 153 | + do { |
| 154 | + previous = current; |
| 155 | + current = current.GetParentDefinition(); |
| 156 | + } while (current !== null) |
| 157 | + |
| 158 | + return previous; |
| 159 | + } |
| 160 | + ); |
139 | 161 | });
|
140 | 162 |
|
141 | 163 | JSIL.MakeClass("System.Reflection.MethodBase", "System.Reflection.MethodInfo", true, [], function ($) {
|
|
0 commit comments