[pgsqlclient-checkins] pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes PgBox.cs,1.6,1.7 Pg
Status: Inactive
Brought to you by:
carlosga_fb
Update of /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes
In directory sc8-pr-cvs1:/tmp/cvs-serv15792
Modified Files:
PgBox.cs PgCircle.cs PgLine.cs PgLSeg.cs PgPath.cs PgPoint.cs
PgPolygon.cs PgTimeSpan.cs
Log Message:
2003-12-14 Carlos Guzmán Álvarez <car...@te...>
* Changed #region names in all source files.
Index: PgBox.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgBox.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PgBox.cs 12 Nov 2003 19:53:11 -0000 1.6
--- PgBox.cs 14 Dec 2003 15:07:55 -0000 1.7
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct 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 lowerLeft, PgPoint upperRight)
! {
! this.lowerLeft = lowerLeft;
! this.upperRight = upperRight;
! }
!
! public PgBox(double x1, double y1, double x2, double y2)
! {
! this.lowerLeft = new PgPoint(x1, y1);
! this.upperRight = new PgPoint(x2, y2);
! }
!
! #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 string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.lowerLeft.X , this.lowerLeft.Y,
! this.upperRight.X , this.upperRight.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgBox)
! {
! return ((PgBox)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct 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 lowerLeft, PgPoint upperRight)
! {
! this.lowerLeft = lowerLeft;
! this.upperRight = upperRight;
! }
!
! public PgBox(double x1, double y1, double x2, double y2)
! {
! this.lowerLeft = new PgPoint(x1, y1);
! this.upperRight = new PgPoint(x2, y2);
! }
!
! #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 string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.lowerLeft.X , this.lowerLeft.Y,
! this.upperRight.X , this.upperRight.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgBox)
! {
! return ((PgBox)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgCircle.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgCircle.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgCircle.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgCircle.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,121 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgCircle
! {
! #region FIELDS
!
! private PgPoint center;
! private double radius;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint Center
! {
! get { return center; }
! }
!
! public double Radius
! {
! get { return radius; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgCircle(PgPoint center, double radius)
! {
! this.center = center;
! this.radius = radius;
! }
!
! public PgCircle(double x, double y, double radius)
! {
! this.center = new PgPoint(x, y);
! this.radius = radius;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgCircle left, PgCircle right)
! {
! if (left.Center == right.Center && left.Radius == right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgCircle left, PgCircle right)
! {
! if (left.Center != right.Center || left.Radius != right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("<({0},{1}),{2}>",
! this.center.X, this.center.Y, this.radius);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgCircle)
! {
! return ((PgCircle)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,121 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgCircle
! {
! #region Fields
!
! private PgPoint center;
! private double radius;
!
! #endregion
!
! #region Properties
!
! public PgPoint Center
! {
! get { return center; }
! }
!
! public double Radius
! {
! get { return radius; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgCircle(PgPoint center, double radius)
! {
! this.center = center;
! this.radius = radius;
! }
!
! public PgCircle(double x, double y, double radius)
! {
! this.center = new PgPoint(x, y);
! this.radius = radius;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgCircle left, PgCircle right)
! {
! if (left.Center == right.Center && left.Radius == right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgCircle left, PgCircle right)
! {
! if (left.Center != right.Center || left.Radius != right.Radius)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("<({0},{1}),{2}>",
! this.center.X, this.center.Y, this.radius);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgCircle)
! {
! return ((PgCircle)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgLine.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLine.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgLine.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgLine.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLine
! {
! #region FIELDS
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgLine(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLine(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLine left, PgLine right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLine left, PgLine right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLine)
! {
! return ((PgLine)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLine
! {
! #region Fields
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region Properties
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgLine(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLine(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLine left, PgLine right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLine left, PgLine right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("(({0},{1}),({2},{3}))",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLine)
! {
! return ((PgLine)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgLSeg.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgLSeg.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgLSeg.cs 12 Nov 2003 19:53:11 -0000 1.5
--- PgLSeg.cs 14 Dec 2003 15:07:55 -0000 1.6
***************
*** 1,124 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLSeg
! {
! #region FIELDS
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgLSeg(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLSeg(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("[({0},{1}),({2},{3})]",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLSeg)
! {
! return ((PgLSeg)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,124 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgLSeg
! {
! #region Fields
!
! private PgPoint startPoint;
! private PgPoint endPoint;
!
! #endregion
!
! #region Properties
!
! public PgPoint StartPoint
! {
! get { return startPoint; }
! }
!
! public PgPoint EndPoint
! {
! get { return endPoint; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgLSeg(PgPoint startPoint, PgPoint endPoint)
! {
! this.startPoint = startPoint;
! this.endPoint = endPoint;
! }
!
! public PgLSeg(double x1, double y1, double x2, double y2)
! {
! this.startPoint = new PgPoint(x1, y1);
! this.endPoint = new PgPoint(x2, y2);
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint == right.StartPoint &&
! left.EndPoint == right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! public static bool operator !=(PgLSeg left, PgLSeg right)
! {
! if (left.StartPoint != right.StartPoint ||
! left.EndPoint != right.EndPoint)
! {
! return true;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("[({0},{1}),({2},{3})]",
! this.startPoint.X , this.startPoint.Y,
! this.endPoint.X , this.endPoint.Y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgLSeg)
! {
! return ((PgLSeg)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPath.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPath.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgPath.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgPath.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,142 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPath
! {
! #region FIELDS
!
! private PgPoint[] points;
! private bool isClosedPath;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! public bool IsClosedPath
! {
! get { return isClosedPath; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPath(bool isClosedPath, PgPoint[] points)
! {
! this.isClosedPath = isClosedPath;
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPath left, PgPath right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPath left, PgPath right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append(this.isClosedPath ? "(" : "[");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(this.isClosedPath ? ")" : "]");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPath)
! {
! return ((PgPath)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,142 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPath
! {
! #region Fields
!
! private PgPoint[] points;
! private bool isClosedPath;
!
! #endregion
!
! #region Properties
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! public bool IsClosedPath
! {
! get { return isClosedPath; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPath(bool isClosedPath, PgPoint[] points)
! {
! this.isClosedPath = isClosedPath;
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPath left, PgPath right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPath left, PgPath right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append(this.isClosedPath ? "(" : "[");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(this.isClosedPath ? ")" : "]");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPath)
! {
! return ((PgPath)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPoint.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPoint.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PgPoint.cs 12 Nov 2003 19:53:11 -0000 1.4
--- PgPoint.cs 14 Dec 2003 15:07:55 -0000 1.5
***************
*** 1,114 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPoint
! {
! #region FIELDS
!
! private double x;
! private double y;
!
! #endregion
!
! #region PROPERTIES
!
! public double X
! {
! get { return x; }
! }
!
! public double Y
! {
! get { return y; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPoint(double x, double y)
! {
! this.x = x;
! this.y = y;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPoint left, PgPoint right)
! {
! if (left.X == right.X && left.Y == right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgPoint left, PgPoint right)
! {
! if (left.X != right.X || left.Y != right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("({0},{1})", this.x, this.y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPoint)
! {
! return ((PgPoint)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,114 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPoint
! {
! #region Fields
!
! private double x;
! private double y;
!
! #endregion
!
! #region Properties
!
! public double X
! {
! get { return x; }
! }
!
! public double Y
! {
! get { return y; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPoint(double x, double y)
! {
! this.x = x;
! this.y = y;
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPoint left, PgPoint right)
! {
! if (left.X == right.X && left.Y == right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! public static bool operator !=(PgPoint left, PgPoint right)
! {
! if (left.X != right.X || left.Y != right.Y)
! {
! return true;
! }
! else
! {
! return true;
! }
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
! b.AppendFormat("({0},{1})", this.x, this.y);
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPoint)
! {
! return ((PgPoint)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgPolygon.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgPolygon.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PgPolygon.cs 12 Nov 2003 19:53:11 -0000 1.5
--- PgPolygon.cs 14 Dec 2003 15:07:55 -0000 1.6
***************
*** 1,135 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPolygon
! {
! #region FIELDS
!
! private PgPoint[] points;
!
! #endregion
!
! #region PROPERTIES
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgPolygon(PgPoint[] points)
! {
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPolygon left, PgPolygon right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPolygon left, PgPolygon right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append("(");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(")");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPolygon)
! {
! return ((PgPolygon)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,135 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgPolygon
! {
! #region Fields
!
! private PgPoint[] points;
!
! #endregion
!
! #region Properties
!
! public PgPoint[] Points
! {
! get { return points; }
! }
!
! #endregion
!
! #region Constructors
!
! public PgPolygon(PgPoint[] points)
! {
! this.points = (PgPoint[])points.Clone();
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgPolygon left, PgPolygon right)
! {
! bool equals = false;
!
! if (left.Points.Length == right.Points.Length)
! {
! equals = true;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! equals = false;
! break;
! }
! }
! }
!
! return equals;
! }
!
! public static bool operator !=(PgPolygon left, PgPolygon right)
! {
! bool notequals = true;
!
! if (left.Points.Length == right.Points.Length)
! {
! notequals = false;
! for (int i = 0; i < left.Points.Length; i++)
! {
! if (left.Points[i] != right.Points[i])
! {
! notequals = true;
! break;
! }
! }
! }
!
! return notequals;
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! System.Text.StringBuilder b = new System.Text.StringBuilder();
!
! b.Append("(");
!
! for (int i = 0; i < this.points.Length; i++)
! {
! if (b.Length > 1)
! {
! b.Append(",");
! }
! b.Append(this.points[i].ToString());
! }
!
! b.Append(")");
!
! return b.ToString();
! }
!
! public override int GetHashCode()
! {
! return base.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgPolygon)
! {
! return ((PgPolygon)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
Index: PgTimeSpan.cs
===================================================================
RCS file: /cvsroot/pgsqlclient/pgsqlclient_10/PostgreSql.Data.PgSqlClient/source/PgTypes/PgTimeSpan.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PgTimeSpan.cs 12 Nov 2003 19:53:11 -0000 1.2
--- PgTimeSpan.cs 14 Dec 2003 15:07:55 -0000 1.3
***************
*** 1,238 ****
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgTimeSpan : IComparable
! {
! #region FIELDS
!
! private TimeSpan interval;
!
! #endregion
!
! #region PROPERTIES
!
! public int Days
! {
! get { return this.interval.Days; }
! }
!
! public int Hours
! {
! get { return this.interval.Hours; }
! }
!
! public int Milliseconds
! {
! get { return this.interval.Milliseconds; }
! }
!
! public int Minutes
! {
! get { return this.interval.Minutes; }
! }
!
! public int Seconds
! {
! get { return this.interval.Seconds; }
! }
!
! public TimeSpan Value
! {
! get { return interval; }
! }
!
! #endregion
!
! #region STATIC_FIELDS
!
! public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue);
! public static readonly PgTimeSpan MinValue = new PgTimeSpan(TimeSpan.MinValue);
! public static readonly PgTimeSpan Null = new PgTimeSpan(TimeSpan.Zero);
!
! #endregion
!
! #region CONSTRUCTORS
!
! public PgTimeSpan(TimeSpan interval)
! {
! this.interval = interval;
! }
!
! #endregion
!
! #region ICOMPARABLE
!
! public int CompareTo(object obj)
! {
! return interval.CompareTo(obj);
! }
!
! #endregion
!
! #region STATIC_METHODS
!
! public static bool GreatherThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x > y);
! }
!
! public static bool GreatherThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x >= y);
! }
!
! public static bool LessThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x < y);
! }
!
! public static bool LessThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x <= y);
! }
!
! public static bool NotEquals(PgTimeSpan x, PgTimeSpan y)
! {
! return (x != y);
! }
!
! public static PgTimeSpan Parse(string s)
! {
! return new PgTimeSpan(TimeSpan.Parse(s));
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgTimeSpan left, PgTimeSpan right)
! {
! bool equals = false;
!
! if (left.Value == right.Value)
! {
! equals = true;
! }
!
! return equals;
! }
!
! public static bool operator !=(PgTimeSpan left, PgTimeSpan right)
! {
! bool notequals = false;
!
! if (left.Value != right.Value)
! {
! notequals = true;
! }
!
! return notequals;
! }
!
! public static bool operator >(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value > right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator >=(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value >= right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator <(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value < right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static bool operator <=(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value <= right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static explicit operator TimeSpan(PgTimeSpan x)
! {
! return x.Value;
! }
!
! public static explicit operator PgTimeSpan(string x)
! {
! return new PgTimeSpan(TimeSpan.Parse(x));
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! return interval.ToString();
! }
!
! public override int GetHashCode()
! {
! return interval.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgTimeSpan)
! {
! return ((PgTimeSpan)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
--- 1,238 ----
! /* PgSqlClient - ADO.NET Data Provider for PostgreSQL 7.4+
! * Copyright (C) 2003 Carlos Guzmán Álvarez
! *
! * This library is free software; you can redistribute it and/or
! * modify it under the terms of the GNU Lesser General Public
! * License as published by the Free Software Foundation; either
! * version 2.1 of the License, or (at your option) any later version.
! *
! * This library is distributed in the hope that it will be useful,
! * but WITHOUT ANY WARRANTY; without even the implied warranty of
! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! * Lesser General Public License for more details.
! *
! * You should have received a copy of the GNU Lesser General Public
! * License along with this library; if not, write to the Free Software
! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! using System;
!
! namespace PostgreSql.Data.PgTypes
! {
! [Serializable]
! public struct PgTimeSpan : IComparable
! {
! #region Fields
!
! private TimeSpan interval;
!
! #endregion
!
! #region Properties
!
! public int Days
! {
! get { return this.interval.Days; }
! }
!
! public int Hours
! {
! get { return this.interval.Hours; }
! }
!
! public int Milliseconds
! {
! get { return this.interval.Milliseconds; }
! }
!
! public int Minutes
! {
! get { return this.interval.Minutes; }
! }
!
! public int Seconds
! {
! get { return this.interval.Seconds; }
! }
!
! public TimeSpan Value
! {
! get { return interval; }
! }
!
! #endregion
!
! #region STATIC_FIELDS
!
! public static readonly PgTimeSpan MaxValue = new PgTimeSpan(TimeSpan.MaxValue);
! public static readonly PgTimeSpan MinValue = new PgTimeSpan(TimeSpan.MinValue);
! public static readonly PgTimeSpan Null = new PgTimeSpan(TimeSpan.Zero);
!
! #endregion
!
! #region Constructors
!
! public PgTimeSpan(TimeSpan interval)
! {
! this.interval = interval;
! }
!
! #endregion
!
! #region ICOMPARABLE
!
! public int CompareTo(object obj)
! {
! return interval.CompareTo(obj);
! }
!
! #endregion
!
! #region Static Methods
!
! public static bool GreatherThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x > y);
! }
!
! public static bool GreatherThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x >= y);
! }
!
! public static bool LessThan(PgTimeSpan x, PgTimeSpan y)
! {
! return (x < y);
! }
!
! public static bool LessThanOrEqual(PgTimeSpan x, PgTimeSpan y)
! {
! return (x <= y);
! }
!
! public static bool NotEquals(PgTimeSpan x, PgTimeSpan y)
! {
! return (x != y);
! }
!
! public static PgTimeSpan Parse(string s)
! {
! return new PgTimeSpan(TimeSpan.Parse(s));
! }
!
! #endregion
!
! #region OPERATORS
!
! public static bool operator ==(PgTimeSpan left, PgTimeSpan right)
! {
! bool equals = false;
!
! if (left.Value == right.Value)
! {
! equals = true;
! }
!
! return equals;
! }
!
! public static bool operator !=(PgTimeSpan left, PgTimeSpan right)
! {
! bool notequals = false;
!
! if (left.Value != right.Value)
! {
! notequals = true;
! }
!
! return notequals;
! }
!
! public static bool operator >(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value > right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator >=(PgTimeSpan left, PgTimeSpan right)
! {
! bool greater = false;
!
! if (left.Value >= right.Value)
! {
! greater = true;
! }
!
! return greater;
! }
!
! public static bool operator <(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value < right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static bool operator <=(PgTimeSpan left, PgTimeSpan right)
! {
! bool less = false;
!
! if (left.Value <= right.Value)
! {
! less = true;
! }
!
! return less;
! }
!
! public static explicit operator TimeSpan(PgTimeSpan x)
! {
! return x.Value;
! }
!
! public static explicit operator PgTimeSpan(string x)
! {
! return new PgTimeSpan(TimeSpan.Parse(x));
! }
!
! #endregion
!
! #region OVERRIDEN_METHODS
!
! public override string ToString()
! {
! return interval.ToString();
! }
!
! public override int GetHashCode()
! {
! return interval.GetHashCode();
! }
!
! public override bool Equals(object obj)
! {
! if (obj is PgTimeSpan)
! {
! return ((PgTimeSpan)obj) == this;
! }
! else
! {
! return false;
! }
! }
!
! #endregion
! }
! }
|