// Apply any configured transforms/cleaning to the name of the supplied entry. private void TransformEntryName(ZipEntry entry) { if (NameTransform == null) { return; } entry.Name = entry.IsDirectory ? NameTransform.TransformDirectory(entry.Name) : NameTransform.TransformFile(entry.Name); }
public void ProcessProjects(IRename rename, ITransform transform) { var nameTransform = new NameTransform(rename); var fullTransform = new CompositeTransform(transform, nameTransform); string basePath = Path.GetDirectoryName(path); foreach (var project in projects.Where(p => !p.IsFolder)) { var projectPath = Path.Combine(basePath, project.Path); var document = new XmlDocument(); document.Load(projectPath); fullTransform.ApplyTransform(projectPath, document); project.Name = rename.RenameSolutionProjectName(project.Name); project.Path = rename.RenameCsproj(project.Path); document.Save(rename.RenameCsproj(projectPath)); // Note that projectPath and project.Path have different values.... } Save(rename.RenameSln(path)); }