public virtual object Clone() { ICoLayer layer = new CoLayerClass { AliasName = this.string_1, Name = this.string_0, Categorie = this.string_2, Enable = this.bool_0, LayerType = this.LayerType, Parameter = new CoLayerHead() }; layer.Parameter.Coordinate = this.coLayerHead_0.Coordinate; layer.Parameter.Dim = this.coLayerHead_0.Dim; layer.Parameter.Meridian = this.coLayerHead_0.Meridian; layer.Parameter.ScaleM = this.coLayerHead_0.ScaleM; layer.Parameter.Spheroid = this.coLayerHead_0.Spheroid; layer.Parameter.Unit = this.coLayerHead_0.Unit; layer.Parameter.MaxPoint = new CoPointClass(this.coLayerHead_0.MaxPoint.X, this.coLayerHead_0.MaxPoint.Y, this.coLayerHead_0.MaxPoint.Z); layer.Parameter.MinPoint = new CoPointClass(this.coLayerHead_0.MinPoint.X, this.coLayerHead_0.MinPoint.Y, this.coLayerHead_0.MinPoint.Z); foreach (ICoField field in this.Fields) { ICoField item = (field as ICoClone).Clone() as ICoField; layer.Fields.Add(item); } return(layer); }
public static CoLayerMapper[] ReadXml(string string_0) { List <CoLayerMapper> list = new List <CoLayerMapper>(); XmlReaderClass class2 = new XmlReaderClass(string_0); foreach (XmlNode node2 in class2.GetCustomSetting("configuration").ChildNodes) { ICoLayer layer = new CoLayerClass { Name = node2.Attributes["sName"].Value, AliasName = node2.Attributes["sAliasName"].Value }; ICoLayer layer2 = new CoLayerClass { Name = node2.Attributes["dName"].Value, AliasName = node2.Attributes["dAliasName"].Value }; CoLayerMapper item = new CoLayerMapper(layer, layer2); foreach (XmlNode node3 in node2.ChildNodes) { ICoField field = new CoFieldClass { Name = node3.Attributes["sName"].Value, AliasName = node3.Attributes["sAliasName"].Value }; ICoField field2 = new CoFieldClass { Name = node3.Attributes["dName"].Value, AliasName = node3.Attributes["dAliasName"].Value }; item.FieldRelation.Add(new CoFieldMapper(field, field2)); } list.Add(item); } return(list.ToArray()); }