private void ReplaceDllReferencesInProjectFiles(LinkToCommandArgs command, Link link) { var csprojs = GetProjectFiles(command); foreach (var csproj in csprojs) { PrintInspectingTextToUi(csproj); if (IsUnrecognizedProjectType(csproj)) { continue; } ReplaceDllReferencesInProject(csproj, link, command); } }
private void ReplaceDllReferencesInProject(FileInfo csproj, Link link, LinkToCommandArgs command) { var replacementRecords = _netFxCsproj.ReplaceReferencedNuGetDllsWithLinkDlls(csproj.FullName, link, command.Dlls); if (replacementRecords.Any()) { foreach (var record in replacementRecords) { PrintReplacementToUi(record); } } else { _ui.Indent() .Write("No changes", ConsoleColor.DarkGray) .End(); } }
private IEnumerable <FileInfo> GetProjectFiles(LinkToCommandArgs command) { return(_filesystem.GetFilesByExtensionRecursively(command.DestinationDirectoryPath, "csproj")); }
private Link GetLink(LinkToCommandArgs command) { return(_linkRegistryFile.GetLink(command.LinkName)); }