Setup() public static method

public static Setup ( IDebugger debugger ) : void
debugger IDebugger
return void
コード例 #1
0
ファイル: ProxyTransport.cs プロジェクト: Nerzool/EppLib.NET
        /// <summary>
        /// Read the command response
        /// </summary>
        /// <returns></returns>
        public byte[] Read()
        {
            byte[]        buffer    = new byte[1024];
            StringBuilder msg       = new StringBuilder();
            int           bytesRead = 0;

            // Incoming message may be larger than the buffer size.
            do
            {
                bytesRead = stream.Read(buffer, 0, buffer.Length);

                msg.AppendFormat("{0}", Encoding.UTF8.GetString(buffer, 0, bytesRead));
            }while (stream.DataAvailable);

            byte[] bytes = Encoding.UTF8.GetBytes(msg.ToString());

            if (loggingEnabled)
            {
                Debug.Setup(new ConsoleLogger());
                Debug.Log("****************** Received ******************");
                Debug.Log(bytes);
            }

            return(bytes);
        }
コード例 #2
0
ファイル: ProxyTransport.cs プロジェクト: Nerzool/EppLib.NET
        /// <summary>
        /// Writes an XmlDocument to the transport stream
        /// </summary>
        /// <param name="s"></param>
        public void Write(XmlDocument s)
        {
            byte[] buffer = GetBytes(s);
            stream.Write(buffer, 0, buffer.Length);

            if (loggingEnabled)
            {
                Debug.Setup(new ConsoleLogger());
                Debug.Log("****************** Sending ******************");
                Debug.Log(buffer);
            }
        }