Skip to content

Commit

Permalink
Update ComWrappersSupport (#771)
Browse files Browse the repository at this point in the history
* move IsTypeWindowsRuntimeType under null check, fixes build break
  • Loading branch information
j0shuams committed Mar 17, 2021
1 parent 6e11955 commit 537d87a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/WinRT.Runtime/ComWrappersSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,15 @@ static bool IsWindowsRuntimeType(Type type)
WinRT.Projections.IsTypeWindowsRuntimeType(type))
return true;
type = type.GetAuthoringMetadataType();
if (type is object && type.GetCustomAttribute<WindowsRuntimeTypeAttribute>() is object)
return true;
return WinRT.Projections.IsTypeWindowsRuntimeType(type);
}

if (type is object)
{
if ((type.GetCustomAttribute<WindowsRuntimeTypeAttribute>() is object) ||
WinRT.Projections.IsTypeWindowsRuntimeType(type))
return true;
}
return false;
}

if (type == typeof(string) || type.IsTypeOfType())
return true;
if (type.IsDelegate())
Expand Down

0 comments on commit 537d87a

Please sign in to comment.