예제 #1
0
 public FolderSchema(FolderSchema model)
 {
     Tag      = model.Tag;
     Value    = model.Value;
     Data     = model.Data;
     Children = model.Children;
 }
예제 #2
0
 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));
         }
     }
 }