/// <summary> /// 读取配置文件来生成依赖注入 /// </summary> public void RegisterTypeFromConfig(string path) { MYIocConfigManager.GetInstance(path).GetMYIoc().GetRegisters().ToList().ForEach(s => { this.RegisterType(s); }); }
public static MYIocConfigManager GetInstance(string path) { object lockObj = new object(); lock (lockObj) if (instance == null || cfgPath != path) { instance = new MYIocConfigManager(path); } return(instance); }
public static MYIocConfigManager GetInstance(string path) { object lockObj = new object(); lock (lockObj) if (instance == null || cfgPath != path) instance = new MYIocConfigManager(path); return instance; }