Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes
In directory sc8-pr-cvs1:/tmp/cvs-serv7438
Modified Files:
PgBox.cs
Log Message:
Added implementation for PgBox type
Index: PgBox.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgBox.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PgBox.cs 18 Oct 2003 11:57:37 -0000 1.1
--- PgBox.cs 18 Oct 2003 12:59:53 -0000 1.2
***************
*** 23,29 ****
public class PgBox
{
! public PgBox()
{
}
}
}
--- 23,107 ----
public class PgBox
{
! #region FIELDS
!
! private PgPoint upperRight;
! private PgPoint lowerLeft;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint UpperRight
! {
! get { return upperRight; }
! }
!
! public PgPoint LowerLeft
! {
! get { return lowerLeft; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgBox(PgPoint upperRigth, PgPoint lowerLeft)
! {
! this.upperRight = upperRigth;
! this.lowerLeft = lowerLeft;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgBox left, PgBox right)
! {
! if (left.UpperRight == right.UpperRight &&
! left.LowerLeft == right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgBox left, PgBox right)
! {
! if (left.UpperRight != right.UpperRight ||
! left.LowerLeft != right.LowerLeft)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
{
+ if (obj is PgBox)
+ {
+ return (obj as PgBox) == this;
+ }
+ else
+ {
+ return false;
+ }
}
+
+ #endregion
}
}
|