Exemplo n.º 1
0
 static void ScanDirectory(string path)
 {
     if (!Directory.Exists(path))
     {
         throw new DirectoryNotFoundException();
     }
     foreach (var file in Directory.EnumerateFiles(path))
     {
         if (!MusicDatabase.CheckFileSupported(file))
         {
             continue;
         }
         Console.WriteLine(file);
         var nb = new B()
         {
             BB = file.GetHashCode().ToString()
         };
         bColle.Insert(nb);
         aColle.Insert(new A()
         {
             AA = file, BB = nb
         });
         //MusicDatabase.CreateSongEntity(file);
     }
 }