mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-25 17:59:24 +01:00
made json converter collection code a bit cleaner
This commit is contained in:
parent
d0370e583e
commit
2744f7d806
1 changed files with 2 additions and 2 deletions
|
@ -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<JsonConverter>().ToArray();
|
||||
|
||||
public static JsonSerializer AddAll(JsonSerializer serializer) {
|
||||
|
|
Loading…
Reference in a new issue