Headless.HttpOutcomeException.GenerateIncorrectLocationMessage C# (CSharp) Method

GenerateIncorrectLocationMessage() private static method

Generates the incorrect location message.
/// The parameter is null. ///
private static GenerateIncorrectLocationMessage ( HttpResult result, Uri targetLocation ) : string
result HttpResult /// The result. ///
targetLocation System.Uri /// The target location. ///
return string
        private static string GenerateIncorrectLocationMessage(HttpResult result, Uri targetLocation)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            var lastOutcome = result.Outcomes.Last();

            var outcomes = result.Outcomes.Aggregate(string.Empty, (x, y) => x + Environment.NewLine + y);

            // We have been requested to go to a location that doesn't match the requested page
            var message = string.Format(
                CultureInfo.CurrentCulture,
                Resources.HttpOutcomeException_InvalidLocation,
                lastOutcome.Location,
                targetLocation,
                outcomes);

            return message;
        }