Opc.Ua.X509SubjectAltNameExtension.Format C# (CSharp) Method

Format() public method

Returns a formatted version of the Abstract Syntax Notation One (ASN.1)-encoded data as a string.
public Format ( bool multiLine ) : string
multiLine bool
return string
        public override string Format(bool multiLine)
        {
            StringBuilder buffer = new StringBuilder();

            for (int ii = 0; ii < m_uris.Count; ii++)
            {
                if (buffer.Length > 0)
                {
                    if (multiLine)
                    {
                        buffer.Append("\r\n");
                    }
                    else
                    {
                        buffer.Append(", ");
                    }
                }

                buffer.Append(s_UniformResourceIdentifier);
                buffer.Append("=");
                buffer.Append(m_uris[ii]);
            }

            for (int ii = 0; ii <  m_domainNames.Count; ii++)
            {
                if (buffer.Length > 0)
                {
                    if (multiLine)
                    {
                        buffer.Append("\r\n");
                    }
                    else
                    {
                        buffer.Append(", ");
                    }
                }

                buffer.Append(s_DnsName);
                buffer.Append("=");
                buffer.Append(m_domainNames[ii]);
            }

            for (int ii = 0; ii < m_ipAddresses.Count; ii++)
            {
                if (buffer.Length > 0)
                {
                    if (multiLine)
                    {
                        buffer.Append("\r\n");
                    }
                    else
                    {
                        buffer.Append(", ");
                    }
                }

                buffer.Append(s_IpAddress);
                buffer.Append("=");
                buffer.Append(m_ipAddresses[ii]);
            }

            return buffer.ToString();
        }