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
0d96ff03
Commit
0d96ff03
authored
Nov 30, 2017
by
avetome
Browse files
Finding extention methods by interface too
parent
4d6aefe1
Changes
1
Show whitespace changes
Inline
Side-by-side
Core/NLua/Extensions/GeneralExtensions.cs
View file @
0d96ff03
...
...
@@ -160,7 +160,9 @@ namespace NLua.Extensions
where
extensionType
.
IsSealed
()
&&
!
extensionType
.
IsGenericType
()
&&
!
extensionType
.
IsNested
from
method
in
extensionType
.
GetMethods
(
BindingFlags
.
Static
|
BindingFlags
.
Public
)
where
method
.
IsDefined
(
typeof
(
ExtensionAttribute
),
false
)
where
(
method
.
GetParameters
()
[
0
].
ParameterType
==
type
||
type
.
IsSubclassOf
(
method
.
GetParameters
()[
0
].
ParameterType
))
where
(
method
.
GetParameters
()[
0
].
ParameterType
==
type
||
type
.
IsSubclassOf
(
method
.
GetParameters
()[
0
].
ParameterType
)
||
type
.
GetInterfaces
().
Contains
(
method
.
GetParameters
()[
0
].
ParameterType
))
select
method
;
return
query
.
ToArray
<
MethodInfo
>
();
}
...
...
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