Opc.Ua.ServiceResult.ToString C# (CSharp) Method

ToString() public method

Converts the value to a human readable string.
public ToString ( ) : string
return string
		public override string ToString()
		{
			StringBuilder buffer = new StringBuilder();

			buffer.Append(LookupSymbolicId(m_code));

			if (!String.IsNullOrEmpty(m_symbolicId))
			{
				if (!String.IsNullOrEmpty(m_namespaceUri))
				{
					buffer.AppendFormat(" ({0}:{1})", m_namespaceUri, m_symbolicId);
				}
				else if (m_symbolicId != buffer.ToString())
				{
					buffer.AppendFormat(" ({0})", m_symbolicId);
				}
            }

            if (!LocalizedText.IsNullOrEmpty(m_localizedText))
            {
                buffer.AppendFormat(" '{0}'", m_localizedText);
            }

			if ((0x0000FFFF & Code) != 0)
			{
				buffer.AppendFormat(" [{0:X4}]", (0x0000FFFF & Code));
			}

			return buffer.ToString();
		}

Usage Example

コード例 #1
0
 /// <summary>
 /// List all reasons for failing cert validation.
 /// </summary>
 private static void TraceInnerServiceResults(ServiceResult result)
 {
     while (result != null)
     {
         Utils.Trace(Utils.TraceMasks.Security, " -- {0}", result.ToString());
         result = result.InnerResult;
     }
 }
All Usage Examples Of Opc.Ua.ServiceResult::ToString