/// <summary> /// Returns a formatted string with the contents of exception. /// </summary> public string ToLongString() { StringBuilder buffer = new StringBuilder(); buffer.Append("Id: "); buffer.Append(StatusCodes.GetBrowseName(m_code)); if (!String.IsNullOrEmpty(m_symbolicId)) { buffer.AppendLine(); buffer.Append("SymbolicId: "); buffer.Append(m_symbolicId); } if (!LocalizedText.IsNullOrEmpty(m_localizedText)) { buffer.AppendLine(); buffer.Append("Description: "); buffer.Append(m_localizedText); } if (AdditionalInfo != null && AdditionalInfo.Length > 0) { buffer.AppendLine(); buffer.Append(AdditionalInfo); } ServiceResult innerResult = m_innerResult; if (innerResult != null) { buffer.AppendLine(); buffer.Append("==="); buffer.AppendLine(); buffer.Append(innerResult.ToLongString()); } return(buffer.ToString()); }