Age | Commit message (Collapse) | Author |
|
|
|
API (#43543)
|
|
* Initial design
* Updating API (API Review feedback)
* Public API updates
* Updating unit tests
* Updating unit tests
* Change `RawValue` to `Value`
* Update src/Http/Http.Abstractions/src/HttpResults/IContentTypeHttpResult.cs
Co-authored-by: Martin Costello <martin@martincostello.com>
* PR review
* Adding comment.
Co-authored-by: Martin Costello <martin@martincostello.com>
|
|
- 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
|
|
Fixes #41383
- Ensure IResult types throw ArgumentNullExceptions on public methods
- Removed unused internal constructors on result types
- Ensure argument exceptions are thrown by public ctors & static factory methods
- Do not throw argument exceptions from internal ctors
- Add tests for all public ctors and factory methods that throw argument exceptions
|
|
(#41161)
- Use the `HttpResult` suffix on `IResult` types except for where the short name has recognized value, e.g. those types that implement `IEndpointMetadataProvider` and will be used in conjunction with `Results<T1, TN>`, e.g. `Results<Ok<Todo>, NotFound>`
- Add `TypedResults.xxx` factory class
- Added `HttpResults.ValidationProblem` type that represents 400 responses with validation errors (equiv to `BadRequest<HttpValidationProblemDetails>`
- Moved `Results<TResult1, TResultN>` types into the `Microsoft.AspNetCore.Http.HttpResults` namespace to match where the other results types are
- Changed `Results.xxx` methods to call through to `TypedResults.xxx` methods
- Explicitly implemented `IEndpointMetadataProvider` on following `IResult` types:
- `Accepted`
- `Accepted<TValue>`
- `AcceptedAtRoute`
- `AcceptedAtRoute<TValue>`
- `BadRequest`
- `BadRequest<TValue>`
- `Conflict`
- `Conflict<TValue>`
- `Created`
- `Created<TValue>`
- `CreatedAtRoute`
- `CreatedAtRoute<TValue>`
- `NoContent`
- `NotFound`
- `NotFound<TValue>`
- `Ok`
- `Ok<TValue>`
- `UnprocessableEntity`
- `UnprocessableEntity<TValue>`
- Order `using` statements before `namespace` declarations
- Added tests for `Microsoft.AspNetCore.Http.Results` and `Microsoft.AspNetCore.Http.TypedResults`
Fixes #41009
Co-authored-by: Bruno Lins de Oliveira <brolivei@microsoft.com>
|