diff --git a/Engine.Core/Factory/TypeFactory.cs b/Engine.Core/Factory/TypeFactory.cs index d84d5de..aa770e1 100644 --- a/Engine.Core/Factory/TypeFactory.cs +++ b/Engine.Core/Factory/TypeFactory.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; @@ -6,7 +7,7 @@ namespace Syntriax.Engine.Core.Factory; public static class TypeFactory { - private static readonly Dictionary registeredTypes = []; + private static readonly ConcurrentDictionary registeredTypes = []; public static string GetTypeName(Type type) => type.FullName ?? throw new ArgumentException($"{type.Name} must be a resolvable type");