@@ -38,6 +38,8 @@ public override int GetHashCode()
3838
3939 public override string ToString ( )
4040 => string . Format ( CultureInfo . InvariantCulture , "({0},{1})" , X , Y ) ;
41+
42+ public void Deconstruct ( out double x , out double y ) => ( x , y ) = ( X , Y ) ;
4143}
4244
4345/// <summary>
@@ -66,6 +68,8 @@ public override bool Equals(object? obj)
6668
6769 public static bool operator == ( NpgsqlLine x , NpgsqlLine y ) => x . Equals ( y ) ;
6870 public static bool operator != ( NpgsqlLine x , NpgsqlLine y ) => ! ( x == y ) ;
71+
72+ public void Deconstruct ( out double a , out double b , out double c ) => ( a , b , c ) = ( A , B , C ) ;
6973}
7074
7175/// <summary>
@@ -103,6 +107,8 @@ public override bool Equals(object? obj)
103107
104108 public static bool operator == ( NpgsqlLSeg x , NpgsqlLSeg y ) => x . Equals ( y ) ;
105109 public static bool operator != ( NpgsqlLSeg x , NpgsqlLSeg y ) => ! ( x == y ) ;
110+
111+ public void Deconstruct ( out NpgsqlPoint start , out NpgsqlPoint end ) => ( start , end ) = ( Start , End ) ;
106112}
107113
108114/// <summary>
@@ -178,6 +184,30 @@ void NormalizeBox()
178184 if ( _upperRight . Y < _lowerLeft . Y )
179185 ( _upperRight . Y , _lowerLeft . Y ) = ( _lowerLeft . Y , _upperRight . Y ) ;
180186 }
187+
188+ public void Deconstruct ( out NpgsqlPoint lowerLeft , out NpgsqlPoint upperRight )
189+ {
190+ lowerLeft = LowerLeft ;
191+ upperRight = UpperRight ;
192+ }
193+
194+ public void Deconstruct ( out double left , out double right , out double bottom , out double top )
195+ {
196+ left = Left ;
197+ right = Right ;
198+ bottom = Bottom ;
199+ top = Top ;
200+ }
201+
202+ public void Deconstruct ( out double left , out double right , out double bottom , out double top , out double width , out double height )
203+ {
204+ left = Left ;
205+ right = Right ;
206+ bottom = Bottom ;
207+ top = Top ;
208+ width = Width ;
209+ height = Height ;
210+ }
181211}
182212
183213/// <summary>
@@ -413,6 +443,19 @@ public override string ToString()
413443
414444 public override int GetHashCode ( )
415445 => HashCode . Combine ( X , Y , Radius ) ;
446+
447+ public void Deconstruct ( out double x , out double y , out double radius )
448+ {
449+ x = X ;
450+ y = Y ;
451+ radius = Radius ;
452+ }
453+
454+ public void Deconstruct ( out NpgsqlPoint center , out double radius )
455+ {
456+ center = Center ;
457+ radius = Radius ;
458+ }
416459}
417460
418461/// <summary>
@@ -562,6 +605,12 @@ public override bool Equals(object? o)
562605 public static bool operator == ( NpgsqlTid left , NpgsqlTid right ) => left . Equals ( right ) ;
563606 public static bool operator != ( NpgsqlTid left , NpgsqlTid right ) => ! ( left == right ) ;
564607 public override string ToString ( ) => $ "({ BlockNumber } ,{ OffsetNumber } )";
608+
609+ public void Deconstruct ( out uint blockNumber , out ushort offsetNumber )
610+ {
611+ blockNumber = BlockNumber ;
612+ offsetNumber = OffsetNumber ;
613+ }
565614}
566615
567616#pragma warning restore 1591
0 commit comments