Last active
August 29, 2015 14:23
-
-
Save omares/e69d56a6ed00fd03c0f8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = typeof(INavigateHere<>).GetTypeInfo(); | |
var test = from type in assembly.DefinedTypes | |
where t.IsAssignableFrom(type) | |
select type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = from type in assembly.DefinedTypes | |
from interfaceType in type.ImplementedInterfaces | |
let interfaceInfo = interfaceType.GetTypeInfo() | |
where interfaceType == targetInterface || interfaceInfo.IsGenericType && interfaceInfo.GetGenericTypeDefinition() == targetInterface | |
select type; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment