Caliburn-Micro / Caliburn.Micro

A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will enable you to build your solution quickly, without the need to sacrifice code quality or testability.
http://caliburnmicro.com/
MIT License
2.8k stars 778 forks source link

Check for multiple assemblies being added to the cache #765

Closed HEskandari closed 3 years ago

HEskandari commented 3 years ago

Resolves #737

vb2ae commented 3 years ago

looks good

KasperSK commented 3 years ago

Looks like the build Pipeline failed I will have a look at it.

HEskandari commented 3 years ago

@KasperSK Yeah, I'll add that, but TBH, I don't know how that bit of the code is supposed to work?

Calling Clear on AssemblySource.Instance calls back the CollectionChanged event with the Rest flag, but at that point, the AssemblySource.Instance is empty, so that code in the Reset block (except for the cache clear) that tries to call the data back into the cache is essentially a no-op.

Update: ah never mind. It is valid when calling "Refresh".

KasperSK commented 3 years ago

@HEskandari BindableCollection sends a Reset if you do an AddRange, RemoveRange or Refresh on it. It is due to some WPF behavior.

HEskandari commented 3 years ago

@KasperSK yep, figured out :) Pushed an update.