[pgsqlclient-checkins] pgsqlclient/PostgreSql.Data.PGSqlClient/source PGConnection.cs,1.2,1.3 PGData
Status: Inactive
Brought to you by:
carlosga_fb
|
From: <car...@us...> - 2003-07-16 19:33:25
|
Update of /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source
In directory sc8-pr-cvs1:/tmp/cvs-serv1562
Modified Files:
PGConnection.cs PGDataAdapter.cs PGDataReader.cs
Log Message:
Added better use of design time attributes.
Index: PGConnection.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGConnection.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGConnection.cs 12 Jul 2003 13:57:59 -0000 1.2
--- PGConnection.cs 16 Jul 2003 19:33:21 -0000 1.3
***************
*** 53,57 ****
#region PROPERTIES
! [Category("Data"), RefreshProperties(RefreshProperties.All)]
public string ConnectionString
{
--- 53,61 ----
#region PROPERTIES
! [Category("Data"),
! RecommendedAsConfigurableAttribute(true),
! RefreshProperties(RefreshProperties.All),
! DefaultValue("")]
! // Editor(typeof(DesingTime.ConnectionStringUIEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string ConnectionString
{
***************
*** 68,71 ****
--- 72,92 ----
}
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public int ConnectionTimeout
+ {
+ get
+ {
+ if (dbConnection != null)
+ {
+ return dbConnection.Settings.Timeout;
+ }
+ else
+ {
+ return 15;
+ }
+ }
+ }
+
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Database
{
***************
*** 83,86 ****
--- 104,108 ----
}
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string DataSource
{
***************
*** 98,117 ****
}
! public int ConnectionTimeout
{
get
{
if (dbConnection != null)
{
! return dbConnection.Settings.Timeout;
! }
! else
! {
! return 15;
}
}
}
! [Browsable(false)]
public string ServerVersion
{
--- 120,140 ----
}
! [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
! public int PacketSize
{
get
{
+ int packetSize = 8192;
if (dbConnection != null)
{
! packetSize = dbConnection.Settings.PacketSize;
}
+
+ return packetSize;
}
}
! [Browsable(false),
! DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string ServerVersion
{
***************
*** 129,149 ****
}
public ConnectionState State
{
get { return state; }
- }
-
- public int PacketSize
- {
- get
- {
- int packetSize = 8192;
- if (dbConnection != null)
- {
- packetSize = dbConnection.Settings.PacketSize;
- }
-
- return packetSize;
- }
}
--- 152,160 ----
}
+ [Browsable(false),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ConnectionState State
{
get { return state; }
}
Index: PGDataAdapter.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataAdapter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PGDataAdapter.cs 13 Jul 2003 14:07:33 -0000 1.2
--- PGDataAdapter.cs 16 Jul 2003 19:33:21 -0000 1.3
***************
*** 33,38 ****
#endregion
! [ToolboxBitmap(typeof(PGDataAdapter), "Resources.ToolboxBitmaps.PGDataAdapter.bmp")]
! [DefaultEvent("RowUpdated")]
public sealed class PGDataAdapter : DbDataAdapter, IDbDataAdapter
{
--- 33,39 ----
#endregion
! [ToolboxBitmap(typeof(PGDataAdapter), "Resources.ToolboxBitmaps.PGDataAdapter.bmp"),
! DesignerCategory("Component"),
! DefaultEvent("RowUpdated")]
public sealed class PGDataAdapter : DbDataAdapter, IDbDataAdapter
{
***************
*** 50,54 ****
private PGCommand updateCommand;
private PGCommand deleteCommand;
-
private bool disposed;
--- 51,54 ----
***************
*** 81,84 ****
--- 81,85 ----
}
+ [Category("DataCategory_Update"), DefaultValue(null)]
public PGCommand SelectCommand
{
***************
*** 87,90 ****
--- 88,92 ----
}
+ [Category("DataCategory_Update"), DefaultValue(null)]
public PGCommand InsertCommand
{
***************
*** 93,96 ****
--- 95,99 ----
}
+ [Category("DataCategory_Fill"), DefaultValue(null)]
public PGCommand UpdateCommand
{
***************
*** 99,102 ****
--- 102,106 ----
}
+ [Category("DataCategory_Update"), DefaultValue(null)]
public PGCommand DeleteCommand
{
***************
*** 175,178 ****
--- 179,183 ----
}
+ [Category("DataCategory_Update")]
public event PGRowUpdatingEventHandler RowUpdating
{
Index: PGDataReader.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient/PostgreSql.Data.PGSqlClient/source/PGDataReader.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PGDataReader.cs 14 Jul 2003 12:48:53 -0000 1.6
--- PGDataReader.cs 16 Jul 2003 19:33:21 -0000 1.7
***************
*** 22,26 ****
using System.Data.Common;
using System.Globalization;
!
using PostgreSql.Data.NPGClient;
using PostgreSql.Data.PGSqlClient.DbSchema;
--- 22,27 ----
using System.Data.Common;
using System.Globalization;
! using System.Reflection;
! using System.ComponentModel;
using PostgreSql.Data.NPGClient;
using PostgreSql.Data.PGSqlClient.DbSchema;
***************
*** 367,370 ****
--- 368,372 ----
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public String GetDataTypeName(int i)
{
***************
*** 438,441 ****
--- 440,444 ----
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
public char GetChar(int i)
{
|