You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* - prune unused preperties
- update docs
* - configuration of endpoints and route groups no longer resolves components from service provider, instead uses RuntimeHelpers.GetUninitializedObject and DOES NOT resolve any of the componenets in ctor dependency injection.
- remove unnecessary dependency
* - add info to docs on dependencies resolved from constructor not being available during configuration.
* - bump version
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,9 @@ Each endpoint must implement two virtual methods:
57
57
58
58
2.**HandleAsync**: Contains the logic to handle incoming requests. Called after the request is validated (if applicable).
59
59
60
-
> **Note**: `ServiceEndpoint` provides a default implementation for the `Configure` method, which can be overridden if necessary.
60
+
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter in the `Configure` method.
61
+
62
+
> **Note**: `ServiceEndpoint` provides a default implementation for the `Configure` method, and only requires `HandleAsync` method implementation.
Copy file name to clipboardExpand all lines: docs/EndpointTypes_MinimalEndpoint.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
>**Package**: `ModEndpoints.Core`
4
4
5
-
MinimalEndpoint within `ModEndpoints.Core` package is closest to barebones Minimal API. Request model (if any) defined for a MinimalEndpoint is bound with [AsParameters] attribute. Its 'HandleAsync' method supports the following types of return values:
5
+
MinimalEndpoint is the endpoint type that is most close to a Minimal API. Request model (if any) defined for a MinimalEndpoint is bound with [AsParameters] attribute. Its 'HandleAsync' method supports the following types of return values:
Copy file name to clipboardExpand all lines: docs/RouteGroups.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ By default, all endpoints are mapped under root route group. It is possible to d
8
8
9
9
Following sample creates a parent route group (FeaturesRouteGroup), a child route group under it (BooksV1RouteGroup) and maps an endpoint (CreateBook) to child route group. Group configuration methods used for this particular sample are all part of Minimal APIs ecosystem and are under [Asp.Versioning](https://github.com/dotnet/aspnet-api-versioning).
10
10
11
+
> **Note**: Dependencies resolved from constructor are not available during configuration. To access a service from dependency injection in the configuration phase, use the `ServiceProvider` property of the configuration context parameter in the `Configure` method.
0 commit comments