* Adds a new API endpoint to trigger graceful disconnection from blazor clients.
* Uses the sendBeacon API on the Blazor client to trigger graceful disconnections on the client when the document gets unloaded, which happens when closing the window, navigating away from the page or refreshing the page.
* Add analzyer for pubternal
This is based on some existing code from EF. I'm having a discussion
with them right now on the best way to share this logic.
I also added support for parameters here which was missing. We might
want to make this code converge with `BannedApiAnalyzer` which is much
more thorough than this.
This is using our existing package for testing analyzers thats the
*official* way to do it in our repo. Filed #12868 to track that.
* Add S C A R Y warnings to render tree types
* PR feedback
* Improve SetParametersAsync docs
Fixes: #12820
* Clarify semantics of clashing cascading parameters
This change attempts to lock down the semantics of how cascading
parameters behave inside ParameterView.SetParameterProperties.
Previously a cascading value could be used to set a non-cascading
parameter, and vice-versa. We were just missing tests in general for how
cascading values are interpreted by the parameter set logic.
[Blazor][Fixes#11964] Limit the amount of pending renders
* Adds a default limit of 10 queued pending renders per application.
* Stops producing new render batches after that limit is hit.
* Resumes producing render batches as soon as the client acknowledges a batch.
* Revert "Revert "Improve components infrastructure (#12145)" (#12679)"
This reverts commit e2d57e2806. The improvement to components infrastructure is now reinstated with the following changes:
* Check in release JS artifacts and use them as a fallback when it's not possible to build npmproj.
* Dont' build nodejs in source build.
* Ensure JsonSerializer always HTML encodes output.
* Update JsonOptions.JsonSerializerOptions to use encoder scheme that does not encode non-ASCII
characters by default. This makes the encoding comparable to Json.NET's defaults
* In SystemTextJsonHelper, ensure that the content is always HTML-encoded
* Unskip skipped test
Fixes https://github.com/aspnet/AspNetCore/issues/9946
Fixes https://github.com/aspnet/AspNetCore/issues/11459
This change adds a fail-fast mechanism to our E2E tests based on
the browser console. This will fail super hard if an unhandled exception
is thrown.
I think it would be interesting to also see if we could do the same
thing for 404s.
The goal of this change is to make it so that the E2E tests can fail
faster (3-4s) than the 30s timeout in the case that something
catastrophic happens. As a nice side benefit you get to see the
exception message.
- In preview8 we warned users for non-public `[Parameter]`s and `[Parameter]` setters. For preview9 this is now an error because things will not work as they expect.
- Updated existing tests to reflect the new error expectation.
#12294
- #12786
- escape `'<'` chars in attribute values to make the .targets file valid XML
- escape `'\''` chars nested within single-quoted values to make `msbuild` conditions valid
* Rename IUriHelper -> NavigationManager
- Remove IUriHelper interface
- Rename to NavigationManager
- Remove all traces of old naming
There's no functional or design change in this commit - just removing
all traces of the old name. The next few iterations will try to improve
the design.
* Minor API tweaks to NavigationManager
Making Initialize protected causes problems because right now the
server-side code needs to deal with one of two different
implementations, hence an exchange type is used. I followed the same
pattern that was used for auth for symmetry but I have some *cool*
thoughts.
- We can remove this when we remove stateful prerendering
- I have another idea to banish this pattern to the land of wind and
ghosts
If this ends up sticking around longer than a week in the code, lets
discuss other ideas and try to improve the pattern.
* Use hub method for server-side navigation
* Get rid of async local
* Add hub method test
* Misc bikeshedding
* Update src/Components/Server/src/Circuits/DefaultCircuitFactory.cs
Co-Authored-By: campersau <buchholz.bastian@googlemail.com>
* PR feedback
Fixes: #5496Fixes: #10448
This change adds a *utility* base class that encourages you to do the
right thing when you need to interact with a disposable scoped or
transient service.
This solution ties the lifetime of a DI scope and a service to a
component instance. Note that this is not recursive - we expect users to
pass services like this around (or as cascading values) if the design
dictates it.
Fixes: #12245Fixes: #12630
This change removes stateful pre-rendering from Server-Side Blazor. This
means that when you render a component during the initial HTTP request,
we we will no longer preserve the component instances and their
parameters. While this feature was useful, it cause serious scalability
concerns.
This means that it will now be required to register "entry-point"
components in startup similar to client-side Blazor.
* Immediately releases the circuit when the client disconnects gracefully.
* This functionality is limited to websockets.
* We are able to release the circuit in the following situations:
* The user closes the browser.
* The user navigates away.
* The user reloads the page.