Commit Graph

1 Commits

Author SHA1 Message Date
Ryan Nowak 6ca30bbfc9
Add runtime support for Blazor attribute splatting (#10357)
* Add basic tests for duplicate attributes

* Add AddMultipleAttributes improve RTB

- Adds AddMultipleAttributes
- Fix RTB to de-dupe attributes
- Fix RTB behaviour with boxed EventCallback (#8336)
- Add lots of tests for new RTB behaviour and EventCallback

* Harden EventCallback test

This was being flaky while I was running E2E tests locally, and it
wasn't using a resiliant equality comparison.

* Add new setting on ParameterAttribute

Adds the option to mark a parameter as an *extra* parameter. Why is this
on ParameterAttribute and not a new type? It makes sense to make it a
modifier on Parameter so you can use it both ways (explicitly set it, or
allow it to collect *extras*).

Added unit tests and validations for interacting with the new setting.

* Add renderer tests for 'extra' parameters

* Refactor Diagnostics for more analyzers

* Simplify analyzer and fix CascadingParameter

This is the *easy way* to write an analyzer that looks at declarations.
The information that's avaialable from symbols is much more high level
than syntax. Much of what's in this code today is needed to reverse
engineer what the compiler does already. If you use symbols you get to
benefit from all of that.

Also added validation for cascading parameters to the analyzer that I
think was just missing due to oversight.

The overall design pattern here is what I've been converging on for the
ASP.NET Core analyzers as a whole, and it seems to scale really well.

* Add analyzer for types

* Add analyzer for uniqueness

This involved a refactor to run the analyzer per-type instead of
per-property.

* Fix project file

* Adjust name

* PR feedback on PCE and more renames

* Remove unused parameter

* Fix #10398

* Add E2E test

* Pranavs cool feedback

* Optimize silent frame removal

* code check

* pr feedback
2019-05-28 17:17:50 -07:00