using System; using System.Collections.Generic; using HeuristicLab.PluginInfrastructure; namespace HeuristicLab.JsonInterface { public static class JsonItemConverterFactory { private static IEnumerable ConverterCache { get; set; } public static JsonItemConverter Create() { if (ConverterCache == null) InitCache(); return new JsonItemConverter(ConverterCache); } private static void InitCache() { IList cache = new List(); foreach (var converter in ApplicationManager.Manager.GetInstances()) { cache.Add(converter); } ConverterCache = cache; } } }