-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AspNetCore: Enable shorter Uris #508
Merged
Daniel-Svensson
merged 16 commits into
OpenRIAServices:main
from
Daniel-Svensson:feature/small_uri
Jun 12, 2024
Merged
AspNetCore: Enable shorter Uris #508
Daniel-Svensson
merged 16 commits into
OpenRIAServices:main
from
Daniel-Svensson:feature/small_uri
Jun 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implemented a new feature to configure the pattern used for generating endpoint routes in domain services The `AddDomainService(Type type)` method was modified to use the new `GetDomainServiceRoute(type)` method. A new file `DomainServiceEndpointRoutePatternAttribute.cs` was added, defining the `EndpointRoutePattern` enum and the `DomainServiceEndpointRoutePatternAttribute` attribute. The `GenerateConstructors()` method in `CSharpDomainContextGenerator.cs` and `CSharpDomainContextGenerator.tt` was modified to use the new `GetDomainServiceUri()` method. A new method `GetDomainServiceUri()` was added to `CSharpDomainContextGenerator.partial.cs` and `DomainServiceProxyGenerator.cs`. The `ClientCodeGenerationDispatcher.cs` and `ClientCodeGenerationOptions.cs` were modified to load and set the `DefaultEndpointRoutePattern` option. The `DomainServiceProxyGenerator.cs` was modified to use the new `GetDomainServiceUri()` method. A new file `EndpointRoutePattern.cs` was added, defining the `EndpointRoutePattern` enum. The `Program.cs` was modified to set the `DomainServiceEndpointRoutePattern` attribute for the assembly to `EndpointRoutePattern.WCF`.
Updated the `BinaryHttpDomainClientFactory` class in the `OpenRiaServices.Client.DomainClients` namespace. The `_httpClientFactory` field now accepts a `Uri` parameter for `HttpClient` creation. Updated `DomainClientFactory` so that it will only append "/binary/" for WCF style Uris, for all other kinds of uri it will ensure there is a trailing "/" instead. Add special workaround for AspNetCore tests so that they use the "Fullname" endpoint pattern even though the client is generated to use WCF style pattern.
Daniel-Svensson
commented
Jun 5, 2024
...enRiaServices.Hosting.AspNetCore/Framework/AspNetCore/OpenRiaServicesConfigurationBuilder.cs
Outdated
Show resolved
Hide resolved
…for .NET and .NET FRAMEWORK
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #507
Add a new Attribute for controlling how the Uri's for endpoints are generated and take it into account for both code generation.
BinaryHttpDomainClientFactory
updates_httpClientFactory
field now accepts aUri
parameter forHttpClient
creation.DomainClientFactory
so that it will only append "/binary/" for WCF style Uris, for all other kinds of uri it willTODO
Copilot suggestions for names: