SIPSorcery.SIP.SIPResponse.ToString C# (CSharp) Метод

ToString() публичный Метод

public ToString ( ) : string
Результат string
        public new string ToString()
        {
            string reasonPhrase = (!ReasonPhrase.IsNullOrBlank()) ? " " + ReasonPhrase : null;

            string message =
                SIPVersion + " " + StatusCode + reasonPhrase + m_CRLF +
                this.Header.ToString();

            if(Body != null)
            {
                message += m_CRLF + Body;
            }
            else
            {
                message += m_CRLF;
            }

            return message;
        }

Usage Example

 void sipTransport2_SIPResponseOutTraceEvent(SIPEndPoint localEndPoint, SIPEndPoint toEndPoint, SIPResponse sipResponse)
 {
     Console.WriteLine("Response Sent: " + localEndPoint.ToString() + "<-" + toEndPoint.ToString() + "\r\n" + sipResponse.ToString());
 }
All Usage Examples Of SIPSorcery.SIP.SIPResponse::ToString