1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

fixed RawContentManager crashing with dynamic assemblies present

This commit is contained in:
Ell 2021-06-20 17:35:56 +02:00
parent a0357e4dfc
commit 07eb6ac36f

View file

@ -13,6 +13,7 @@ namespace MLEM.Data.Content {
public class RawContentManager : ContentManager, IGameComponent {
private static readonly RawContentReader[] Readers = AppDomain.CurrentDomain.GetAssemblies()
.Where(a => !a.IsDynamic)
.SelectMany(a => a.GetExportedTypes())
.Where(t => t.IsSubclassOf(typeof(RawContentReader)) && !t.IsAbstract)
.Select(t => t.GetConstructor(Type.EmptyTypes).Invoke(null))