Microsoft.Azure.Commands.OperationalInsights.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)
        {
            IEnumerable<string> requestIds;

            if (exception.Response != null
                && exception.Response.Headers != null
                && exception.Response.Headers.TryGetValue("x-ms-request-id", out requestIds))
            {
                return string.Join(";", requestIds);
            }

            return string.Empty;
        }
    }