Esempio n. 1
0
 /// <summary>
 /// 载入当前任务参数数据
 /// </summary>
 /// <param name="path"></param>
 public virtual void Load(string path)
 {
     foreach (var item in GetType().GetProperties())
     {
         if (typeof(IReadWrite).IsAssignableFrom(item.PropertyType))
         {
             IReadWrite readWrite = (IReadWrite)item.GetValue(this, null);
             string     fileName  = path + "\\" + Name + "_" + item.Name + ".Config";
             object     load      = global::HzControl.Communal.Tools.Serialization.LoadFromXml(readWrite.GetType(), fileName, true);
             item.SetValue(this, load, null);
         }
     }
 }