File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,12 @@ private List<ParameterMapping> GetParameters(MethodDeclarationSyntax method)
120
120
{
121
121
return method . ParameterList . Parameters . Select ( p =>
122
122
{
123
- var direction = "Input" ;
124
- if ( p . Modifiers . Any ( m => m . IsKind ( SyntaxKind . OutKeyword ) ) )
125
- direction = "Output" ;
126
- else if ( p . Modifiers . Any ( m => m . IsKind ( SyntaxKind . RefKeyword ) ) )
127
- direction = "InputOutput" ;
123
+ var direction = p . Modifiers switch
124
+ {
125
+ var mods when mods . Any ( m => m . IsKind ( SyntaxKind . OutKeyword ) ) => "Output" ,
126
+ var mods when mods . Any ( m => m . IsKind ( SyntaxKind . RefKeyword ) ) => "InputOutput" ,
127
+ _ => "Input"
128
+ } ;
128
129
129
130
int ? size = null ;
130
131
var attr = p . AttributeLists . SelectMany ( a => a . Attributes )
You can’t perform that action at this time.
0 commit comments