From 2744f7d8063aac4bb5c2b232abed31d2b73df984 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 27 Feb 2020 19:43:36 +0100 Subject: [PATCH] made json converter collection code a bit cleaner --- MLEM.Data/Json/JsonConverters.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MLEM.Data/Json/JsonConverters.cs b/MLEM.Data/Json/JsonConverters.cs index 5e7cf0b..8553cb5 100644 --- a/MLEM.Data/Json/JsonConverters.cs +++ b/MLEM.Data/Json/JsonConverters.cs @@ -6,8 +6,8 @@ using Newtonsoft.Json; namespace MLEM.Data.Json { public class JsonConverters { - public static readonly JsonConverter[] Converters = Assembly.GetExecutingAssembly().GetExportedTypes() - .Where(t => t.Namespace == typeof(JsonConverters).Namespace && t.IsSubclassOf(typeof(JsonConverter))) + public static readonly JsonConverter[] Converters = typeof(JsonConverters).Assembly.GetExportedTypes() + .Where(t => t.IsSubclassOf(typeof(JsonConverter))) .Select(t => t.GetConstructor(Type.EmptyTypes).Invoke(null)).Cast().ToArray(); public static JsonSerializer AddAll(JsonSerializer serializer) {