Skip to content

Commit

Permalink
Update per blizzy78/ksp_toolbar#39 to resolve NotSupportedException.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerbas-ad-astra committed Oct 20, 2016
1 parent df3f6c4 commit b780728
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ToolbarWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,15 @@ internal ToolbarTypes() {
}

internal static Type getType(string name) {
return AssemblyLoader.loadedAssemblies
.SelectMany(a => a.assembly.GetExportedTypes())
.SingleOrDefault(t => t.FullName == name);
Type type = null;
AssemblyLoader.loadedAssemblies.TypeOperation(t =>
{
if (t.FullName == name)
{
type = t;
}
});
return type;
}

internal static PropertyInfo getProperty(Type type, string name) {
Expand Down

0 comments on commit b780728

Please sign in to comment.