Skip to content

Commit a509890

Browse files
committed
Refactoring.
1 parent 9b819c4 commit a509890

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/FirebirdSql.Data.FirebirdClient/Common/TypeDecoder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ namespace FirebirdSql.Data.Common;
2424

2525
internal static class TypeDecoder
2626
{
27-
public static decimal DecodeDecimal(object value, int scale, int sqltype)
27+
public static decimal DecodeDecimal(object value, int scale, int type)
2828
{
2929
var shift = scale < 0 ? -scale : scale;
3030

31-
switch (sqltype & ~1)
31+
switch (type & ~1)
3232
{
3333
case IscCodes.SQL_SHORT:
3434
return DecimalShiftHelper.ShiftDecimalLeft((decimal)(short)value, shift);
@@ -48,7 +48,7 @@ public static decimal DecodeDecimal(object value, int scale, int sqltype)
4848
return DecimalShiftHelper.ShiftDecimalLeft((decimal)(BigInteger)value, shift);
4949

5050
default:
51-
throw new ArgumentOutOfRangeException(nameof(sqltype), $"{nameof(sqltype)}={sqltype}");
51+
throw new ArgumentOutOfRangeException(nameof(type), $"{nameof(type)}={type}");
5252
}
5353
}
5454

src/FirebirdSql.Data.FirebirdClient/Common/TypeEncoder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ namespace FirebirdSql.Data.Common;
2525

2626
internal static class TypeEncoder
2727
{
28-
public static object EncodeDecimal(decimal d, int scale, int sqltype)
28+
public static object EncodeDecimal(decimal d, int scale, int type)
2929
{
3030
var shift = scale < 0 ? -scale : scale;
3131

32-
switch (sqltype & ~1)
32+
switch (type & ~1)
3333
{
3434
case IscCodes.SQL_SHORT:
3535
return (short)DecimalShiftHelper.ShiftDecimalRight(d, shift);
@@ -49,7 +49,7 @@ public static object EncodeDecimal(decimal d, int scale, int sqltype)
4949
return (BigInteger)DecimalShiftHelper.ShiftDecimalRight(d, shift);
5050

5151
default:
52-
throw new ArgumentOutOfRangeException(nameof(sqltype), $"{nameof(sqltype)}={sqltype}");
52+
throw new ArgumentOutOfRangeException(nameof(type), $"{nameof(type)}={type}");
5353
}
5454
}
5555

0 commit comments

Comments
 (0)