Microsoft.Azure.Common.CloudExceptionExtensions.GetRequestId C# (CSharp) Method

GetRequestId() public static method

public static GetRequestId ( this exception ) : string
exception this
return string
        public static string GetRequestId(this CloudException exception)
        {
            if (exception == null ||
               exception.Response == null ||
               exception.Response.Headers == null ||
               !exception.Response.Headers.Keys.Contains("x-ms-request-id"))
            {
                return null;
            }

            return exception.Response.Headers["x-ms-request-id"].FirstOrDefault();

        }
        public static string GetRoutingRequestId(this CloudException exception)
CloudExceptionExtensions