diff options
author | Damian Edwards <damian@damianedwards.com> | 2022-06-06 21:01:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 21:01:42 +0300 |
commit | f73497c33244ba0a42b084885645ff155541e8af (patch) | |
tree | e4feba224739c17e99dce46b71a8abbc31e8d17c /src/Http/Http.Results/test/CreatedAtRouteResultTests.cs | |
parent | 2a18e456e376be80f35c54380545b6164bd4ac73 (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.cs | 2 |
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); |