Files
Tim Smith 129d33624a Updated EpicGames.Build to be a net6 project.
#rb jonathan.adamczewsky
#preflight 6258081cd606fd159ec036f8

[CL 19753396 by Tim Smith in ue5-main branch]
2022-04-14 07:44:59 -04:00

26 lines
464 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System;
using System.Linq;
using System.Reflection;
namespace UnrealBuildBase
{
public static class AssemblyExtensions
{
public static Type[] SafeGetLoadedTypes(this Assembly Dll)
{
Type[] AllTypes;
try
{
AllTypes = Dll.GetTypes();
}
catch (ReflectionTypeLoadException e)
{
AllTypes = e.Types.Where(x => x != null).Cast<Type>().ToArray();
}
return AllTypes;
}
}
}