Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>10.2.1</VersionPrefix>
<VersionPrefix>10.2.2</VersionPrefix>
<AssemblyVersion>10.2.0.0</AssemblyVersion>
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
<RootNamespace>Asp.Versioning</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Asp.Versioning.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Primitives;
using System.Collections;
using static Asp.Versioning.ApiVersionProviderOptions;
Expand Down Expand Up @@ -59,10 +60,16 @@ public virtual IApplicationBuilder CreateApplicationBuilder() =>

private sealed class ServiceProviderDecorator(
IServiceProvider decorated,
ApiVersionSetBuilder versionSetBuilder ) : IServiceProvider
ApiVersionSetBuilder versionSetBuilder ) : IKeyedServiceProvider
{
private ApiVersionSet? versionSet;

public object? GetKeyedService( Type serviceType, object? serviceKey ) =>
decorated.GetKeyedService( serviceType, serviceKey );

public object GetRequiredKeyedService( Type serviceType, object? serviceKey ) =>
decorated.GetRequiredKeyedService( serviceType, serviceKey );

public object? GetService( Type serviceType )
{
if ( typeof( ApiVersionSetBuilder ).Equals( serviceType ) )
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Patch analyzers; no functional changes
Versioned endpoint route builder should support keyed services [Issue #1219](https://github.com/dotnet/aspnet-api-versioning/issues/1219)
Loading