public static string GetLogMessage(this UpdateOperation operation) { if (operation.IsIgnored) { return($"Ignoring {operation.PackageId}"); } else if (operation.PreviousVersion == operation.UpdatedVersion) { return($"Skipping {operation.PackageId}: version {operation.UpdatedVersion} already found in {operation.FilePath}"); } else if (operation.IsDowngrade()) { return($"Downgrading {operation.PackageId} from {operation.PreviousVersion} to {operation.UpdatedVersion} in {operation.FilePath}"); } else if (operation.ShouldProceed()) { return($"Updating {operation.PackageId} from {operation.PreviousVersion} to {operation.UpdatedVersion} in {operation.FilePath}"); } else { return($"Skipping {operation.PackageId}: version {operation.PreviousVersion} found in {operation.FilePath}, version {operation.UpdatedVersion} found in {operation.FeedUri}"); } }