Skip to content

Commit bda72af

Browse files
committed
Update Microsoft.AspNetCore.OData package reference to support v 9.2.1
1 parent 3fc0719 commit bda72af

File tree

12 files changed

+33
-13
lines changed

12 files changed

+33
-13
lines changed

examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
55
</ItemGroup>
66

7+
<ItemGroup>
8+
<PackageReference Update="Microsoft.AspNetCore.OData" Version="9.2.1" />
9+
</ItemGroup>
10+
711
</Project>

examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
55
</ItemGroup>
66

7+
<ItemGroup>
8+
<PackageReference Update="Microsoft.AspNetCore.OData" Version="9.2.1" />
9+
</ItemGroup>
10+
711
</Project>

examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData\Asp.Versioning.OData.csproj" />
55
</ItemGroup>
66

7+
<ItemGroup>
8+
<PackageReference Update="Microsoft.AspNetCore.OData" Version="9.2.1" />
9+
</ItemGroup>
10+
711
</Project>

examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@
1212
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData.ApiExplorer\Asp.Versioning.OData.ApiExplorer.csproj" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<PackageReference Update="Microsoft.AspNetCore.OData" Version="9.2.1" />
17+
</ItemGroup>
18+
1519
</Project>

examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@
1212
<ProjectReference Include="..\..\..\..\src\AspNetCore\OData\src\Asp.Versioning.OData.ApiExplorer\Asp.Versioning.OData.ApiExplorer.csproj" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<PackageReference Update="Microsoft.AspNetCore.OData" Version="9.2.1" />
17+
</ItemGroup>
18+
1519
</Project>

src/AspNet/OData/src/Asp.Versioning.WebApi.OData.ApiExplorer/Conventions/ODataAttributeVisitor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ private void VisitAction( HttpActionDescriptor action )
1313
var attributes = new List<EnableQueryAttribute>( controller.GetCustomAttributes<EnableQueryAttribute>( inherit: true ) );
1414

1515
attributes.AddRange( action.GetCustomAttributes<EnableQueryAttribute>( inherit: true ) );
16-
VisitEnableQuery( attributes );
16+
VisitEnableQuery( attributes.ToArray() );
1717
}
1818
}

src/AspNetCore/OData/src/Asp.Versioning.OData.ApiExplorer/Asp.Versioning.OData.ApiExplorer.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>8.1.0</VersionPrefix>
5-
<AssemblyVersion>8.1.0.0</AssemblyVersion>
4+
<VersionPrefix>8.2.0</VersionPrefix>
5+
<AssemblyVersion>8.2.0.0</AssemblyVersion>
66
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning API Explorer for OData v4.0</AssemblyTitle>

src/AspNetCore/OData/src/Asp.Versioning.OData/Asp.Versioning.OData.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<VersionPrefix>8.1.0</VersionPrefix>
5-
<AssemblyVersion>8.1.0.0</AssemblyVersion>
4+
<VersionPrefix>8.2.0</VersionPrefix>
5+
<AssemblyVersion>8.2.0.0</AssemblyVersion>
66
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
77
<RootNamespace>Asp.Versioning</RootNamespace>
88
<AssemblyTitle>ASP.NET Core API Versioning with OData v4.0</AssemblyTitle>
@@ -15,7 +15,7 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,9.0.0)" />
18+
<PackageReference Include="Microsoft.AspNetCore.OData" Version="[8.0.2,9.3.0)" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

src/AspNetCore/OData/src/Asp.Versioning.OData/OData/ODataApplicationModelProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private static
141141
return (metadataControllers, supported, deprecated);
142142
}
143143

144-
private static ControllerModel? SelectBestMetadataController( IReadOnlyList<ControllerModel> controllers )
144+
private static ControllerModel? SelectBestMetadataController( List<ControllerModel> controllers )
145145
{
146146
// note: there should be at least 2 metadata controllers, but there could be 3+
147147
// if a developer defines their own custom controller. ultimately, there can be

src/AspNetCore/OData/test/Asp.Versioning.OData.ApiExplorer.Tests/ApiExplorer/ODataApiDescriptionProviderTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ private static void AssertQueryOptionWithoutOData( ApiDescription description, s
256256
parameter.ModelMetadata.Description.Should().EndWith( suffix + '.' );
257257
}
258258

259-
private void PrintGroup( IReadOnlyList<ApiDescription> items )
259+
private void PrintGroup( ApiDescription[] items )
260260
{
261-
for ( var i = 0; i < items.Count; i++ )
261+
for ( var i = 0; i < items.Length; i++ )
262262
{
263263
var item = items[i];
264264
console.WriteLine( $"[{item.GroupName}] {item.HttpMethod} {item.RelativePath}" );

src/AspNetCore/WebApi/src/Asp.Versioning.Mvc/ApplicationModels/DefaultApiControllerFilter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Asp.Versioning.ApplicationModels;
1010
[CLSCompliant( false )]
1111
public sealed class DefaultApiControllerFilter : IApiControllerFilter
1212
{
13-
private readonly IReadOnlyList<IApiControllerSpecification> specifications;
13+
private readonly List<IApiControllerSpecification> specifications;
1414

1515
/// <summary>
1616
/// Initializes a new instance of the <see cref="DefaultApiControllerFilter"/> class.
@@ -19,7 +19,7 @@ public sealed class DefaultApiControllerFilter : IApiControllerFilter
1919
/// <see cref="IApiControllerSpecification">specifications</see> used by the filter
2020
/// to identify API controllers.</param>
2121
public DefaultApiControllerFilter( IEnumerable<IApiControllerSpecification> specifications ) =>
22-
this.specifications = specifications.ToArray();
22+
this.specifications = specifications.ToList();
2323

2424
/// <inheritdoc />
2525
public IList<ControllerModel> Apply( IList<ControllerModel> controllers )

src/Common/src/Common.OData.ApiExplorer/Conventions/ODataAttributeVisitor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ private void VisitModel( IEdmStructuredType modelType )
7676
VisitMaxTop( querySettings );
7777
}
7878

79-
private void VisitEnableQuery( IReadOnlyList<EnableQueryAttribute> attributes )
79+
private void VisitEnableQuery( EnableQueryAttribute[] attributes )
8080
{
8181
var @default = new EnableQueryAttribute();
8282

83-
for ( var i = 0; i < attributes.Count; i++ )
83+
for ( var i = 0; i < attributes.Length; i++ )
8484
{
8585
var attribute = attributes[i];
8686

0 commit comments

Comments
 (0)