Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Edwards <damian@damianedwards.com>2022-06-06 21:01:42 +0300
committerGitHub <noreply@github.com>2022-06-06 21:01:42 +0300
commitf73497c33244ba0a42b084885645ff155541e8af (patch)
treee4feba224739c17e99dce46b71a8abbc31e8d17c /src/Http/Http.Results/test/CreatedAtRouteResultTests.cs
parent2a18e456e376be80f35c54380545b6164bd4ac73 (diff)
RequestDelegateFactory context classes ApplicationServices property (#41952)
- Added `public IServiceProvider ApplicationServices { get; }` property to `RouteHandlerContext` - Enables route handler filter factories to access app services - Renamed existing `Services` property on `EndpointParameterMetadataContext` and `EndpointMetadataContext` to `ApplicationServices` and made it non-nullable - Added a unit test & updated another to ensure app's service provider is passed through correctly by `RequestDelegateFactory` Fixes #41900
Diffstat (limited to 'src/Http/Http.Results/test/CreatedAtRouteResultTests.cs')
-rw-r--r--src/Http/Http.Results/test/CreatedAtRouteResultTests.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Http/Http.Results/test/CreatedAtRouteResultTests.cs b/src/Http/Http.Results/test/CreatedAtRouteResultTests.cs
index 04c55274d6..eee33d4d84 100644
--- a/src/Http/Http.Results/test/CreatedAtRouteResultTests.cs
+++ b/src/Http/Http.Results/test/CreatedAtRouteResultTests.cs
@@ -71,7 +71,7 @@ public partial class CreatedAtRouteResultTests
// Arrange
CreatedAtRoute MyApi() { throw new NotImplementedException(); }
var metadata = new List<object>();
- var context = new EndpointMetadataContext(((Delegate)MyApi).GetMethodInfo(), metadata, null);
+ var context = new EndpointMetadataContext(((Delegate)MyApi).GetMethodInfo(), metadata, EmptyServiceProvider.Instance);
// Act
PopulateMetadata<CreatedAtRoute>(context);