Commit Graph

6 Commits

Author SHA1 Message Date
Javier Calvarro Nelson 74c09470c6
[Blazor][Fixes #12056] Avoid producing warnings for bad inputs.
* Does not produce warnings when receiving invalid event arguments.
* Does not produce warnings when receiving an invalid event handler id.
* Does not produce warnings when receiving an ack for an unknown batch.
2019-08-14 13:01:53 +02:00
Ryan Nowak 18f5ec71ed Terminate circuit on error
Fixes: #11845

See: https://github.com/aspnet/AspNetCore/pull/12857 for detailed notes.
2019-08-11 10:49:14 -07:00
Steve Sanderson d716ca9d62
Remove .Web IVTs and refactor. Fixes #12713 (#12967)
* Remove IVTs from Microsoft.AspNetCore.Components.Web to .Blazor/.Server

* Eliminate RendererRegistry from .Web, as it's not needed for server-side Blazor

* Reintroduce RendererRegistry as a WebAssembly-specific concept. Refactor event data parsing.

* Remove redundant guard

* Corresponding test updates

* Update ref sources

* CR: Remove renderer ID fully from server-side Blazor code

* CR: Make WebEventData internal and shared-source

* Hub test updates

* Clean whitespace

* Update binaries

* Regenerate binaries AGAIN

* Update Jest test

* CR: Replace constructor with static parse

* Yet again attempt to refresh the .js binaries

* Fix ref assembly

* Fix test
2019-08-09 00:03:40 +01:00
Ryan Nowak d52d7e3284
Harden StartCircuit (#12825)
* Harden StartCircuit

Fixes: #12057

Adds some upfront argument validation as well as error handling for
circuit intialization failures.
2019-08-02 20:35:29 -07:00
Ryan Nowak 9b888e9df5
Blazor API Review: IUriHelper (#12425)
* 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
2019-08-01 17:11:09 -07:00
Javier Calvarro Nelson 4bbfd4dd0a
[Blazor][Fixes #12054] ComponentHub reliability improvements. (#12316)
* [Blazor][Fixes #12054] ComponentHub reliability improvements.
* Validates StartCircuit is called once per circuit.
* NOOPs when other hub methods are called before start circuit and
  returns an error to the client.
2019-07-19 15:00:03 +02:00