Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
a93daf26
Commit
a93daf26
authored
Mar 30, 2019
by
Vinicius Jarina
Browse files
Use `IsAssignableFrom` instead `IsSuclassOf`.
* Fixed
https://github.com/NLua/NLua/issues/181
parent
ad9dc280
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Extensions/TypeExtensions.cs
View file @
a93daf26
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment