File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -592,24 +592,18 @@ internal static Transaction GetCurrentTransaction()
592592 internal static bool IsDirection ( DbParameter value , ParameterDirection condition )
593593 {
594594#if DEBUG
595- IsDirectionValid ( condition ) ;
595+ switch ( condition )
596+ { // @perfnote: Enum.IsDefined
597+ case ParameterDirection . Input :
598+ case ParameterDirection . Output :
599+ case ParameterDirection . InputOutput :
600+ case ParameterDirection . ReturnValue :
601+ break ;
602+ default :
603+ throw ADP . InvalidParameterDirection ( condition ) ;
604+ }
596605#endif
597606 return ( condition == ( condition & value . Direction ) ) ;
598-
599- // local function
600- static void IsDirectionValid ( ParameterDirection value )
601- {
602- switch ( value )
603- { // @perfnote: Enum.IsDefined
604- case ParameterDirection . Input :
605- case ParameterDirection . Output :
606- case ParameterDirection . InputOutput :
607- case ParameterDirection . ReturnValue :
608- break ;
609- default :
610- throw ADP . InvalidParameterDirection ( value ) ;
611- }
612- }
613607 }
614608
615609 internal static void IsNullOrSqlType ( object value , out bool isNull , out bool isSqlType )
You can’t perform that action at this time.
0 commit comments