File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/CommandLineUtils/HelpText Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ protected virtual void GenerateArguments(
194194 var description = arg . Description ;
195195 var allowedValuesBeenSet = false ;
196196
197- foreach ( var attributeValidator in arg . Validators . Cast < AttributeValidator > ( ) )
197+ foreach ( var attributeValidator in arg . Validators . OfType < AttributeValidator > ( ) )
198198 {
199199 if ( attributeValidator ? . ValidationAttribute is AllowedValuesAttribute allowedValuesAttribute )
200200 {
@@ -251,7 +251,7 @@ protected virtual void GenerateOptions(
251251 var description = opt . Description ;
252252 var allowedValuesBeenSet = false ;
253253
254- foreach ( var attributeValidator in opt . Validators . Cast < AttributeValidator > ( ) )
254+ foreach ( var attributeValidator in opt . Validators . OfType < AttributeValidator > ( ) )
255255 {
256256 if ( attributeValidator ? . ValidationAttribute is AllowedValuesAttribute allowedValuesAttribute )
257257 {
You can’t perform that action at this time.
0 commit comments