public HashFile(HashProject project, string name, string type) { Project = project; Name = name; Type = type; Hash = HashHelper.HashFile(Path.Combine(project.ProjectDirectory, Name)); }
public HashSolution(string solutionFile) { SolutionFile = solutionFile; SolutionDirectory = Path.GetDirectoryName(SolutionFile); foreach (var line in System.IO.File.ReadAllLines(solutionFile)) { var ma = ProjectRe.Match(line); if (ma.Success) { var hashProject = new HashProject(this, ma.Groups["Name"].Value, ma.Groups["ProjectFile"].Value); Projects.Add(hashProject); } } var sb = new StringBuilder(); foreach (var project in Projects.OrderBy(p => p.ProjectFile)) { sb.Append(project.Hash); } Hash = HashHelper.HashObject(sb.ToString()); }