Beispiel #1
0
 public void SafeFile(IFilemove filemove, MetadataItem mdi)
 {
     if (File.Exists(mdi._filePath))
     {
         XMLSerialization serialization = new XMLSerialization();
         serialization.SerializeObject(mdi);
         //FileMove filemove = new FileMove();
         filemove.CopyFile(mdi);
     }
 }
        public List <MetadataItem> GetAllFiles()
        {
            XMLSerialization serialization;

            serialization = new XMLSerialization();
            List <MetadataItem> results = new List <MetadataItem>();
            MetadataItem        mdi;

            foreach (string e in directories)
            {
                foreach (string d in Directory.GetFiles(e, "*.xml"))
                {
                    mdi = serialization.DeserializeObject((String)d);
                    results.Add(mdi);
                }
            }

            this.metadataItemsList = results;
            return(this.metadataItemsList);
        }