/// <summary> /// list the files that need to be recompiled because of table CRC change /// </summary> /// <param name="filesToCompile"></param> private void FilesToCompileBecauseOfTableCrcChanges(ref HashSet <string> filesToCompile) { var exec = new ProExecutionTableCrc { NeedDatabaseConnection = true }; exec.Start(); exec.WaitForProcessExit(0); var currentTables = exec.GetTableCrc(); if (currentTables != null) { foreach (var prevCompFile in PreviouslyDeployedFiles.Where(file => file is FileDeployedCompiled).Cast <FileDeployedCompiled>().Where(file => file.RequiredTables != null)) { foreach (var tableRequired in prevCompFile.RequiredTables) { var foundCorrespondance = currentTables.Find(table => table.QualifiedTableName.EqualsCi(tableRequired.QualifiedTableName)); // the file uses an unknown table or uses a table which CRC changed? if (foundCorrespondance == null || !foundCorrespondance.Crc.Equals(tableRequired.Crc)) { if (!filesToCompile.Contains(prevCompFile.SourcePath)) { filesToCompile.Add(prevCompFile.SourcePath); } } } } } }
public static void DebugTest2() { var exec = new ProExecutionTableCrc { NeedDatabaseConnection = true }; exec.OnExecutionOk += execution => { var sb = new StringBuilder(); foreach (var tab in ((ProExecutionTableCrc)execution).GetTableCrc()) { sb.Append(tab.QualifiedTableName + " -> " + tab.Crc + "<br>"); } UserCommunication.Notify(sb.ToString()); }; exec.Start(); }