@@ -1022,6 +1022,33 @@ public void BuildRequestDelegateThrowsInvalidOperationExceptionForInvalidParamet
10221022        Assert . Equal ( errorMessage ,  exception . Message ) ; 
10231023    } 
10241024
1025+     public  static   object [ ] [ ]  BadArgumentEnumerableActions 
1026+     { 
1027+         get 
1028+         { 
1029+             void  TestParameterStringList ( [ AsParameters ]  List < string >  req )  {  } 
1030+             void  TestParameterDictionary ( [ AsParameters ]  Dictionary < string ,  string >  req )  {  } 
1031+             void  TestParameterIntArray ( [ AsParameters ]  int [ ]  req )  {  } 
1032+ 
1033+             return  new  object [ ] [ ] 
1034+             { 
1035+                 new  object [ ]  {  ( Action < List < string > > ) TestParameterStringList  } , 
1036+                 new  object [ ]  {  ( Action < Dictionary < string ,  string > > ) TestParameterDictionary  } , 
1037+                 new  object [ ]  {  ( Action < int [ ] > ) TestParameterIntArray  } 
1038+             } ; 
1039+         } 
1040+     } 
1041+ 
1042+     [ Theory ] 
1043+     [ MemberData ( nameof ( BadArgumentEnumerableActions ) ) ] 
1044+     public  void  BuildRequestDelegateThrowsNotSupportedExceptionForEnumerable ( Delegate  @delegate ) 
1045+     { 
1046+         var  errorMessage  =  $ "The { nameof ( AsParametersAttribute ) }  is not supported on enumerable parameters."; 
1047+         var  exception  =  Assert . Throws < NotSupportedException > ( ( )  =>  RequestDelegateFactory . Create ( @delegate ) ) ; 
1048+ 
1049+         Assert . Equal ( errorMessage ,  exception . Message ) ; 
1050+     } 
1051+ 
10251052    [ Fact ] 
10261053    public  void  BuildRequestDelegateThrowsNotSupportedExceptionForNestedParametersList ( ) 
10271054    { 
@@ -2014,6 +2041,15 @@ void TestJsonAndFormWithAttribute(Todo value1, [FromForm] string value2) { }
20142041        Assert . Throws < InvalidOperationException > ( ( )  =>  RequestDelegateFactory . Create ( TestJsonAndFormWithAttribute ) ) ; 
20152042    } 
20162043
2044+     [ Fact ] 
2045+     public  void  CreateThrowsInvalidOperationExceptionIfIFormFileCollectionHasAsParametersAttribute ( ) 
2046+     { 
2047+         void  TestAction ( [ AsParameters ]  IFormFileCollection  formFiles )  { } 
2048+ 
2049+         var  ioe  =  Assert . Throws < InvalidOperationException > ( ( )  =>  RequestDelegateFactory . Create ( TestAction ) ) ; 
2050+         Assert . Equal ( "The abstract type 'IFormFileCollection' is not supported." ,  ioe . Message ) ; 
2051+     } 
2052+ 
20172053    [ Fact ] 
20182054    public  void  CreateThrowsNotSupportedExceptionIfIFormFileCollectionHasMetadataParameterName ( ) 
20192055    { 
0 commit comments