Headless.Extensions.TraceResults C# (CSharp) Method

TraceResults() public static method

Traces the details of the HTTP result.
This method uses Trace.WriteLine(string) to trace each outcome in the result and the overall response time.
/// The parameter is null. ///
public static TraceResults ( this result ) : void
result this /// The result. ///
return void
        public static void TraceResults(this HttpResult result)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }

            foreach (var outcome in result.Outcomes)
            {
                Trace.WriteLine(outcome);
            }

            Trace.WriteLine("Total response time: " + result.ResponseTime.TotalMilliseconds + " milliseconds");
        }