/// <summary> /// /// </summary> /// <param name="sfile"></param> public void Load(string sfile) { if (System.IO.File.Exists(sfile)) { XElement xx = XElement.Load(sfile); foreach (var vv in xx.Elements()) { string tname = vv.Attribute("TypeName").Value; var asb = ServiceLocator.Locator.Resolve <IApiFactory>()?.GetDevelopInstance(tname); asb.Load(vv); mApi = asb; } } if (mApi == null) { mApi = ServiceLocator.Locator.Resolve <IApiFactory>()?.GetDevelopInstance(); } }
/// <summary> /// /// </summary> public void Reload() { this.mApi = null; Load(); }