Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.Build/System/AssemblyExtensions.cs
Tim Smith 603b903987 Prepare UBT and automation code type scanning for the moving of the MSBuild code. This requires a change in how we handle the load failure of Microsoft.build.framework.
#rb leigh.swift
#rnx
#preflight 62337c800820efd0945e40d0

[CL 19424430 by Tim Smith in ue5-main branch]
2022-03-17 14:44:47 -04:00

26 lines
451 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).ToArray();
}
return AllTypes;
}
}
}