Ejemplo n.º 1
0
 /// <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();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public void Reload()
 {
     this.mApi = null;
     Load();
 }