예제 #1
0
        private static string AccessTokenLogMessage(WebResponse webResponse, AccessTokenError error)
        {
            var sb = new StringBuilder();

            if (error != null)
            {
                sb.AppendFormat("Error: {0}.", error.Error);
                sb.AppendFormat("Error Description: {0}.", error.ErrorDescription);
                sb.AppendLine();
            }

            sb.AppendLine("- Headers ------------------------------------------------------------------");
            HttpHeaders(sb, webResponse.Headers);
            sb.AppendLine();

            return sb.ToString();
        }
 internal WnsAccessTokenSendResult(Uri channelUri, WebException exception, AccessTokenError error)
     : base(channelUri, exception)
 {
     this.AccessTokenError = error;
     this.ErrorDescription = string.Format("{0}: {1}.", this.AccessTokenError.Error, this.AccessTokenError.ErrorDescription);
 }