Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit 81e1929

Browse files
author
Eric Maupin
committed
[mac] Properly handle inspector enabled
1 parent 22cc654 commit 81e1929

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Xamarin.PropertyEditing.Mac.Standalone/Xamarin.PropertyEditing.Mac.Standalone.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
<HttpClientHandler></HttpClientHandler>
3232
<LinkMode></LinkMode>
3333
<XamMacArch></XamMacArch>
34-
<XamarinInspectorDisabled>True</XamarinInspectorDisabled>
3534
</PropertyGroup>
3635
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3736
<DebugType>pdbonly</DebugType>

Xamarin.PropertyEditing/Reflection/ReflectionObjectEditor.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ internal static Task<AssignableTypesResult> GetAssignableTypes (ITypeInfo type,
141141
{
142142
return Task.Run (() => {
143143
var types = AppDomain.CurrentDomain.GetAssemblies ().SelectMany (a => a.GetTypes ()).AsParallel ()
144-
.Where (t => t.Namespace != null && !t.IsAbstract && !t.IsInterface && t.IsPublic && t.GetConstructor (Type.EmptyTypes) != null);
144+
.Where (t => {
145+
try {
146+
return t.Namespace != null && !t.IsAbstract && !t.IsInterface && t.IsPublic && t.GetConstructor (Type.EmptyTypes) != null;
147+
} catch (TypeLoadException) {
148+
return false;
149+
}
150+
});
145151

146152
Type realType = ReflectionEditorProvider.GetRealType (type);
147153
if (childTypes) {

0 commit comments

Comments
 (0)