public FolderSchema(FolderSchema model) { Tag = model.Tag; Value = model.Value; Data = model.Data; Children = model.Children; }
public void Copy(FolderSchema model) { Tag = model.Tag; Value = model.Value; Data.Copy(model.Data); Children = new ObservableCollection <XmlAnything <ISchema> >(); foreach (XmlAnything <ISchema> schema in model.Children) { if (typeof(FolderSchema) == schema.Value.GetType()) { FolderSchema tmp = new FolderSchema(); tmp.Copy(schema.Value as FolderSchema); Children.Add(new XmlAnything <ISchema>(tmp)); } if (typeof(FileSchema) == schema.Value.GetType()) { FileSchema tmp = new FileSchema(); tmp.Copy(schema.Value as FileSchema); Children.Add(new XmlAnything <ISchema>(tmp)); } } }