Prevents multiple initialization of extension manager.
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Reflection;
|
||||
|
||||
namespace Cryville.Crtr.Browsing {
|
||||
internal static class ExtensionManager {
|
||||
static bool _init;
|
||||
static readonly Dictionary<string, List<ResourceConverter>> _converters
|
||||
= new Dictionary<string, List<ResourceConverter>>();
|
||||
public static ISet<string> GetSupportedFormats() {
|
||||
@@ -25,6 +26,8 @@ namespace Cryville.Crtr.Browsing {
|
||||
return _localRes;
|
||||
}
|
||||
public static void Init(string rootPath) {
|
||||
if (_init) return;
|
||||
_init = true;
|
||||
LoadExtension(typeof(Extensions.Extension));
|
||||
var asms = AppDomain.CurrentDomain.GetAssemblies().Select(a => a.GetName().Name).ToHashSet();
|
||||
var modules = new Queue<ModuleItem>();
|
||||
|
Reference in New Issue
Block a user