1 // created on 8/6/2003 at 13:57
2 // Npgsql.NpgsqlAsciiRow.cs
5 // Francisco Jr. (fxjrlists@yahoo.com.br)
7 // Copyright (C) 2002 The Npgsql Development Team
8 // npgsql-general@gborg.postgresql.org
9 // http://gborg.postgresql.org/project/npgsql/projdisplay.php
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 using System.Collections;
37 /// This class represents the ParameterStatus message sent from PostgreSQL
41 internal sealed class NpgsqlParameterStatus
44 private String _parameter;
45 private String _parameterValue;
48 public void ReadFromStream(Stream inputStream, Encoding encoding)
52 Byte[] inputBuffer = new Byte[4];
53 PGUtil.CheckedStreamRead(inputStream, inputBuffer, 0, 4 );
55 Int32 messageLength = IPAddress.NetworkToHostOrder(BitConverter.ToInt32(inputBuffer, 0));
57 _parameter = PGUtil.ReadString(inputStream, encoding);
58 _parameterValue = PGUtil.ReadString(inputStream, encoding);
63 public String Parameter
71 public String ParameterValue
75 return _parameterValue;