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

ToString() public method

Returns a string representation of the HierarchyBrowsePath.
public ToString ( string format, IFormatProvider provider ) : string
format string The format.
provider IFormatProvider The provider.
return string
        public string ToString(string format, IFormatProvider provider)
        {
            if (format != null)
            {
                throw new FormatException(Utils.Format("Invalid format string: '{0}'.", format));
            }

            string referenceType = null;

            if (m_referenceTypeId != null && m_referenceTypeId.IdType == IdType.Numeric && m_referenceTypeId.NamespaceIndex == 0)
            {
                referenceType = ReferenceTypes.GetBrowseName((uint)m_referenceTypeId.Identifier);
            }
            
            if (referenceType == null)
            {
                referenceType = Utils.Format("{0}", m_referenceTypeId);
            }

            if (m_isInverse)
            {
                return Utils.Format("<!{0}>{1}", referenceType, m_targetId);
            }
            else
            {
                return Utils.Format("<{0}>{1}", referenceType, m_targetId);
            }
        }
        #endregion

Same methods

ReferenceNode::ToString ( ) : string