Commit a93daf26 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Use `IsAssignableFrom` instead `IsSuclassOf`.

* Fixed https://github.com/NLua/NLua/issues/181
parent ad9dc280
...@@ -112,7 +112,7 @@ namespace NLua.Extensions ...@@ -112,7 +112,7 @@ namespace NLua.Extensions
.Where(t => t.method.IsDefined(typeof(ExtensionAttribute), false)) .Where(t => t.method.IsDefined(typeof(ExtensionAttribute), false))
.Where(t => .Where(t =>
t.method.GetParameters()[0].ParameterType == type || t.method.GetParameters()[0].ParameterType == type ||
type.IsSubclassOf(t.method.GetParameters()[0].ParameterType) || t.method.GetParameters()[0].ParameterType.IsAssignableFrom(type) ||
type.GetInterfaces().Contains(t.method.GetParameters()[0].ParameterType)) type.GetInterfaces().Contains(t.method.GetParameters()[0].ParameterType))
.Select(t => t.method); .Select(t => t.method);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment