/// <summary> /// By Default registers all modules specified in lookupAssemblies.json in root directory which ends with Repository /// </summary> public ModuleRegistrant() { var checkedDir = SearchUtils.CheckCommonAssemblyStoresForFile(RegistrantOptions.LookupFileNames); if (string.IsNullOrEmpty(checkedDir)) { checkedDir = Directory.GetCurrentDirectory(); } var cfgBuilder = new ConfigurationBuilder() .SetBasePath(checkedDir); foreach (var fileName in RegistrantOptions.LookupFileNames) { var ext = Path.GetExtension(fileName); if (ext == ConfigurationFileTypes.Json.GetCode()) { cfgBuilder.AddJsonFile(fileName, optional: true); } if (ext == ConfigurationFileTypes.Xml.GetCode()) { cfgBuilder.AddXmlFile(fileName, optional: true); } } Cfg = cfgBuilder.Build(); }