Skip to content

Commit

Permalink
remove IsDirectionValid
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari committed Oct 1, 2021
1 parent 776b147 commit b005a15
Showing 1 changed file with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -592,24 +592,18 @@ internal static Transaction GetCurrentTransaction()
internal static bool IsDirection(DbParameter value, ParameterDirection condition)
{
#if DEBUG
IsDirectionValid(condition);
switch (condition)
{ // @perfnote: Enum.IsDefined
case ParameterDirection.Input:
case ParameterDirection.Output:
case ParameterDirection.InputOutput:
case ParameterDirection.ReturnValue:
break;
default:
throw ADP.InvalidParameterDirection(condition);
}
#endif
return (condition == (condition & value.Direction));

// local function
static void IsDirectionValid(ParameterDirection value)
{
switch (value)
{ // @perfnote: Enum.IsDefined
case ParameterDirection.Input:
case ParameterDirection.Output:
case ParameterDirection.InputOutput:
case ParameterDirection.ReturnValue:
break;
default:
throw ADP.InvalidParameterDirection(value);
}
}
}

internal static void IsNullOrSqlType(object value, out bool isNull, out bool isSqlType)
Expand Down

0 comments on commit b005a15

Please sign in to comment.