public IEnumerable <IBlockWithSources> GetSourceFilesWithBlocks(long blocksize)
 {
     using (var cmd = m_connection.CreateCommand(m_transaction.Parent))
         using (var rd = cmd.ExecuteReader(string.Format(@"SELECT DISTINCT ""{0}"".""Hash"", ""{0}"".""Size"", ""File"".""Path"", ""BlocksetEntry"".""Index"" * {1} FROM  ""{0}"", ""Block"", ""BlocksetEntry"", ""File"" WHERE ""File"".""BlocksetID"" = ""BlocksetEntry"".""BlocksetID"" AND ""Block"".""ID"" = ""BlocksetEntry"".""BlockID"" AND ""{0}"".""Hash"" = ""Block"".""Hash"" AND ""{0}"".""Size"" = ""Block"".""Size"" AND ""{0}"".""Restored"" = ? ", m_tablename, blocksize), 0))
             if (rd.Read())
             {
                 var bs = new BlockWithSources(rd);
                 while (!bs.Done)
                 {
                     yield return((IBlockWithSources)bs);
                 }
             }
 }
 public IEnumerable<IBlockWithSources> GetSourceFilesWithBlocks(long blocksize)
 {
     using(var cmd = m_connection.CreateCommand(m_transaction.Parent))
         using(var rd = cmd.ExecuteReader(string.Format(@"SELECT DISTINCT ""{0}"".""Hash"", ""{0}"".""Size"", ""File"".""Path"", ""BlocksetEntry"".""Index"" * {1} FROM  ""{0}"", ""Block"", ""BlocksetEntry"", ""File"" WHERE ""File"".""BlocksetID"" = ""BlocksetEntry"".""BlocksetID"" AND ""Block"".""ID"" = ""BlocksetEntry"".""BlockID"" AND ""{0}"".""Hash"" = ""Block"".""Hash"" AND ""{0}"".""Size"" = ""Block"".""Size"" AND ""{0}"".""Restored"" = ? ", m_tablename, blocksize), 0))
             if (rd.Read())
             {
                 var bs = new BlockWithSources(rd);
                 while (!bs.Done)
                     yield return (IBlockWithSources)bs;
             }
 }