* [XamlC] no longer use any reflection-base ImportReference
reflection-base ImportReference -- we were using MethodBase and Type --
are importing the types present in the reflection context, at the time
of compilation. As the compilation happens on netstandard2.0, and our
assembly can now be netstandard1.0 again, those imported types are
failing to be resolved.
this changes always import references based on the assembly, or the
assembly references.
it might, or might not, give us another speed bump.
* [XamlC] accomodate all kinds of netstandard versions
* reuse caching code
ImportReference with System.Reflection based argument is notoriously
slow on .NET. So we cache the results for those.
We do not cache the results for TypeReference, MethodReference or
FieldReference calls, as those are already fast (passthrough if the
reference was already imported), and they aren't valid as dictionary
keys (no concept of equatability).
While we're at it, we shave another few ms from Resolve(TypeReference)
calls as well.
As, on good days, it shaves up to 40% of XamlC time, we can say that it
- fixes#1848
* Port from old VSM branch
* Add PS and notes
* Checkpoint: entry text UWP mostly working, need to check on background colors
* Remove irrelevant samples from the EntryDisabledStatesGallery
Make Background color work on UWP Entry with VSM
* Add platform specific for disabling legacy colors on Android
* Add OnPlatform example to visual state manager gallery
* Add example OnIdiom in Visual State Manager
* Add platform specific for disabling legacy color mode on iOS Entry
* Add gallery for Button disabled states
Handling legacy colors for Buttons on Android
* Split out disabled states galleries; disabled legacy handling for Picker
* TimePicker disabled states
* DatePicker color management on Android
* Color management for pre-AppCompat button
* Button legacy color handling on iOS
* Consolidate Platform Specifics;
legacy colors working for iOS Picker and DatePicker
* Fix broken search bar color management
SearchBar color management working with VSM
Add test page for SearchBar disabled color management
Consolidate legacy color management check code into extension method on Android
* Legacy color management for Editor on Android
* Fix legacy color stuff for SearchBar Cancel button on iOS
* C# 7 cleanup
* Add colors for Cancel Button
* Make sure VisualStateGroup collections set by styles are distinct objects
* Validation example
* Make common state names consts
* Make the Windows VSM and Forms VSM work together
* Update galleries for Windows
* Make new methods internal
* Split gallery classes and add more explanation to validation example
* Remove debugging statements
* Add a quick code-only example
* Make legacy color management work for fast button renderer
* Remove old TODO
* Update docs
* Move RunTimeNamePropertyAttribute to Xamarin.Forms.Xaml namespace
* Verify XF namespace when looking for VisualState
* Use nameof
* Make common states constants public
* Cast VisualElement directly so it crashes if the property is set on the wrong type
* Collection -> IList for VisualStateManager
* Setting fromStyle to true
* Remove extraneous `private set`
* Seal VSM classes
* Use constraints instead of ==
* Add teardown method; use constraints rather than ==
* Remove null checking with GetVisualStateGroups
* Don't explicitly initialize collections on elements
* Actually, turns out that fromStyle:false *was* correct
* Direct casts
* Use GetIsDefault check in GoToState
* Validate parents in FindTypeForVisualState
* Validate group and state names on Add
* Fixed check for setter collection
* Fix issues with "duplicate" names when VisualStateGroups declared directly on VisualElements
* Add gallery example for VSGs directly on VisualElements
* Update docs
* Fix bug where initial TextColor isn't set for FastRenderer Button
* Move to explicit VisualStateGroupList in Setter
* Fix return types for unit tests
* Using string.CompareOrdinal in GetState
* Update docs
* Add check for null/empty VisualState Name properties
* [XamlC] change MockCompile (internal) API
* [XamlC] fix debugging in unit test project
* f
* [XamlC] update cecil to 0.10.0-beta1-v2
* beta2
* avoid method duplication
* [XamlC] force loading MdbReader and Writer
* [XamlC] force use the writer in the other task too
* [XamlC] fix test and test code generator
* try building this
* [XamlC] Ensure InitializeComponent is correctly routed
* fix
* [Xaml] DataTrigger and PropertyCondition no longer use a ServiceProvider
* [XamlC] avoid generating ServiceProvider for unused ProvideValue
* fix tests
* [XamlC] Allow compilation of IValueProviders
`IValueProvider`s tagged with the appropriate attribute will be bypassed
and the compiled version, if found, will be used.
This first version contains a compiled version of Setter's
IValueProvider and it already reduces the amount of generated IL by 39%
in, e.g. StyleTests.
It's a huge gain because XamlC no longer have to generate
ServiceProviders for those, so the methodbody is smaller, takes less
time to jit, less time to execute and nothing is invoked at runtime,
which probably saves a tons of time as well, as most IValueProvider
implementation heavily uses reflection.
* name bool parameters