ParseRawMessage() private method

private ParseRawMessage ( ) : void
return void
Exemplo n.º 1
0
        public async Task RetrieveAsync(Pop3Message message)
        {
            if (!this.IsConnected)
            {
                throw new InvalidOperationException("Pop3 client is not connected to host");
            }

            if (message == null)
            {
                throw new ArgumentNullException("message");
            }

            await SendCommandAsync("RETR", message).ConfigureAwait(false);

            while (true)
            {
                string response = await _networkOperations.ReadAsync( ).ConfigureAwait(false);

                if (response == ".\r\n")
                {
                    break;
                }

                message.RawMessage += response;
            }

            message.ParseRawMessage( );

            message.Retrieved = true;
        }
Exemplo n.º 2
0
        public void Retrieve(Pop3Message message)
        {
            if (!this.IsConnected)
            {
                throw new InvalidOperationException("Pop3 client is not connected to host");
            }
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }

            SendCommand("RETR", message);

            while (true)
            {
                string response = _networkOperations.Read( );
                if (response == ".\r\n")
                {
                    break;
                }

                message.RawMessage += response;
            }
            message.ParseRawMessage( );

            message.Retrieved = true;
        }
Exemplo n.º 3
0
        public async Task RetrieveAsync( Pop3Message message )
        {
            if ( !this.IsConnected )
                throw new InvalidOperationException( "Pop3 client is not connected to host" );

            if ( message == null )
                throw new ArgumentNullException( "message" );

            await SendCommandAsync( "RETR", message ).ConfigureAwait( false );

            while ( true )
            {
                string response = await _networkOperations.ReadAsync( ).ConfigureAwait( false );
                if ( response == ".\r\n" )
                    break;

                message.RawMessage += response;
            }

            message.ParseRawMessage( );

            message.Retrieved = true;
        }
Exemplo n.º 4
0
        public void Retrieve( Pop3Message message )
        {
            if ( !this.IsConnected )
                throw new InvalidOperationException( "Pop3 client is not connected to host" );
            if ( message == null )
                throw new ArgumentNullException( "message" );

            SendCommand( "RETR", message );

            while ( true )
            {
                string response = _networkOperations.Read( );
                if ( response == ".\r\n" )
                    break;

                message.RawMessage += response;
            }
            message.ParseRawMessage( );

            message.Retrieved = true;
        }