File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
OData/src/Asp.Versioning.OData/OData
WebApi/src/Asp.Versioning.Mvc/ApplicationModels Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ private static
154154 var original = typeof ( MetadataController ) . GetTypeInfo ( ) ;
155155 var versioned = typeof ( VersionedMetadataController ) . GetTypeInfo ( ) ;
156156
157- for ( var i = 0 ; i < controllers . Length ; i ++ )
157+ for ( var i = 0 ; i < controllers . Count ; i ++ )
158158 {
159159 var controller = controllers [ i ] ;
160160
@@ -192,7 +192,7 @@ private void ApplyMetadataControllerConventions(
192192 return ;
193193 }
194194
195- var metadataController = SelectBestMetadataController ( metadataControllers . ToArray ( ) ) ;
195+ var metadataController = SelectBestMetadataController ( metadataControllers ) ;
196196
197197 if ( metadataController == null )
198198 {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public DefaultApiControllerFilter( IEnumerable<IApiControllerSpecification> spec
2424 /// <inheritdoc />
2525 public IList < ControllerModel > Apply ( IList < ControllerModel > controllers )
2626 {
27- if ( specifications . Length == 0 )
27+ if ( specifications . Count == 0 )
2828 {
2929 return controllers ;
3030 }
@@ -44,7 +44,7 @@ public IList<ControllerModel> Apply( IList<ControllerModel> controllers )
4444
4545 private bool IsApiController ( ControllerModel controller )
4646 {
47- for ( var i = 0 ; i < specifications . Length ; i ++ )
47+ for ( var i = 0 ; i < specifications . Count ; i ++ )
4848 {
4949 if ( specifications [ i ] . IsSatisfiedBy ( controller ) )
5050 {
You can’t perform that action at this time.
0 commit comments