Created
July 6, 2012 00:15
-
-
Save anaisbetts/3057262 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
| internal static Type reallyFindType(string type, bool throwOnFailure) | |
| { | |
| #if WINRT | |
| // WinRT hates your favorite band too. | |
| return Type.GetType(type, false); | |
| #else | |
| return AppDomain.CurrentDomain.GetAssemblies() | |
| .SelectMany(x => x.GetTypes()) | |
| .Where(x => x.FullName == type) | |
| .FirstOrDefault(); | |
| #endif | |
| } |
Author
@nuclearsandwich This is trying to find a Type in all the loaded assemblies. Unfortunately, there is no way in WinRT to get the loaded assembly list, or to do a type search that isn't limited to the executing assembly.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
explain?