Skip to content

Commit

Permalink
Fixed #295
Browse files Browse the repository at this point in the history
  • Loading branch information
liiir1985 committed Apr 1, 2020
1 parent da15012 commit 8391483
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ILRuntime/Reflection/ILRuntimeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,17 @@ protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr,
return null;
}

public override Type[] GetGenericArguments()
{
var args = type.GenericArguments;
Type[] res = new Type[args.Length];
for(int i = 0; i < res.Length; i++)
{
res[i] = args[i].Value.ReflectionType;
}
return res;
}

protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
IMethod res;
Expand Down
5 changes: 5 additions & 0 deletions ILRuntime/Reflection/ILRuntimeWrapperType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ public override Type GetGenericTypeDefinition()
return et.GetGenericTypeDefinition();
}

public override Type[] GetGenericArguments()
{
return et.GetGenericArguments();
}

public override bool IsGenericParameter
{
get
Expand Down

0 comments on commit 8391483

Please sign in to comment.