Ejemplo n.º 1
0
 /// <summary>
 /// Get the sql file with its content.
 /// </summary>
 /// <returns>The sql file with its content.</returns>
 public override IEnumerable <SqlFileDetail> GetSqlFilesWithContents()
 {
     return(new List <SqlFileDetail> {
         new SqlFileDetail {
             FullPath = FilesLocation,
             Name = Path.GetFileName(FilesLocation),
             Content = File.ReadAllText(FilesLocation),
             HashSum = HashSumAnalyzer.GetFileHash(FilesLocation)
         }
     });
 }
 public override IEnumerable <SqlFileDetail> GetSqlFilesWithContents()
 {
     foreach (var file in Directory.EnumerateFiles(FilesLocation, "*.sql"))
     {
         SqlFileDetail sqlFile = null;
         try
         {
             sqlFile = new SqlFileDetail()
             {
                 FullPath = file,
                 Name     = Path.GetFileName(file),
                 Content  = File.ReadAllText(file),
                 HashSum  = HashSumAnalyzer.GetFileHash(file)
             };
         }
         catch (Exception)
         {
             throw;
         }
         yield return(sqlFile);
     }
 }