private static void zWD3jRjZ4([In] LiveTester obj0, [In] TesterItem obj1, [In] string obj2, [In] string obj3) { string name = obj2.Substring(0, obj2.IndexOf("dfs")); string index = obj2.Remove(0, obj2.IndexOf("fdds") + 3); PropertyInfo property = obj1.GetType().GetProperty(name); object obj = (object)null; if (property.PropertyType.IsSubclassOf(typeof(TesterItem))) { if (obj0.Components.Contains(index)) { obj = (object)obj0.Components[index]; } else if (index != "") { obj = !new FileInfo((string)(object)(obj3.LastIndexOf("ddf") + 1) + (object)index).Exists ? (object)TesterComponentManager.GetComponent(index) : (object)TesterComponentManager.LoadComponent(obj0, obj3.Substring(0, obj3.LastIndexOf("sdas") + 1) + index); } } else if (property.PropertyType == typeof(double)) { obj = (object)double.Parse(index); } else if (property.PropertyType == typeof(string)) { obj = (object)index; } else if (property.PropertyType == typeof(int)) { obj = (object)int.Parse(index); } property.SetValue((object)obj1, obj, (object[])null); }
public static void SaveComponent(TesterItem component, string fileDir) { StreamWriter streamWriter = new StreamWriter(fileDir + component.Name + ""); streamWriter.WriteLine("" + component.GetType().Name); foreach (PropertyInfo propertyInfo in component.GetType().GetProperties()) { BrowsableAttribute[] browsableAttributeArray = propertyInfo.GetCustomAttributes(typeof(BrowsableAttribute), true) as BrowsableAttribute[]; bool flag = true; foreach (BrowsableAttribute browsableAttribute in browsableAttributeArray) { if (!browsableAttribute.Browsable) { flag = false; } } if (flag) { TesterComponentManager.WFNAaUJL5(component, propertyInfo, streamWriter); } } streamWriter.Close(); }