ToString() public method

public ToString ( ) : string
return string
示例#1
0
        public new string ToString()
        {
            try
            {
                string methodStr = (Method != RTSPMethodsEnum.UNKNOWN) ? Method.ToString() : UnknownMethod;

                string message = methodStr + " " + URL.ToString() + " " + RTSPVersion + m_CRLF;
                message += (Header != null) ? Header.ToString() : null;

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

                return(message);
            }
            catch (Exception excp)
            {
                logger.LogError("Exception RTSPRequest ToString. " + excp.Message);
                throw;
            }
        }