ToString() public method

Creates a String representation of this object
public ToString ( ) : System.String
return System.String
示例#1
0
        /// <summary>
        ///     Send a request to the server.  A Message class is created
        ///     for the specified request which causes the message to be sent.
        ///     The request is added to the list of messages being managed by
        ///     this agent.
        /// </summary>
        /// <param name="conn">
        ///     the connection that identifies the server.
        /// </param>
        /// <param name="msg">
        ///     the LdapMessage to send.
        /// </param>
        /// <param name="timeOut">
        ///     the interval to wait for the message to complete or.
        ///     <code>null</code> if infinite.
        /// </param>
        internal Task SendMessageAsync(Connection conn, LdapMessage msg, int timeOut, BindProperties bindProps, CancellationToken cancellationToken)
        {
            Debug.WriteLine(msg.ToString());

            // creating a messageInfo causes the message to be sent
            // and a timer to be started if needed.
            var message = new Message(msg, timeOut, conn, this, bindProps);

            _messages.Add(message);
            return(message.SendMessageAsync(cancellationToken)); // Now send message to server
        }
示例#2
0
        /// <summary>
        ///     Send a request to the server.  A Message class is created
        ///     for the specified request which causes the message to be sent.
        ///     The request is added to the list of messages being managed by
        ///     this agent.
        /// </summary>
        /// <param name="conn">
        ///     the connection that identifies the server.
        /// </param>
        /// <param name="msg">
        ///     the LdapMessage to send.
        /// </param>
        /// <param name="timeOut">
        ///     the interval to wait for the message to complete or.
        ///     <code>null</code> if infinite.
        /// </param>
        internal void SendMessage(Connection conn, LdapMessage msg, int timeOut, BindProperties bindProps)
        {
            Debug.WriteLine(msg.ToString());

            // creating a messageInfo causes the message to be sent
            // and a timer to be started if needed.
            var message = new Message(msg, timeOut, conn, this, bindProps);

            _messages.Add(message);
            message.SendMessage(); // Now send message to server
        }