ModuleCatalog validation logic problem

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Jun 16, 2011 at 4:20 PM

Hi,

I was browsing the source and found the following methods in ModuleCatalog.  Notice that when the collection change it only does something if validated and the method it calls only does something if not validated - so nothing can ever happen.  I think this is a cut and paste bug and should read to set Validated to false when the collection changes, then call EnsureCatalogValidated.  It might be worth walking through the validation sequence to determine what the expected behavior is when the catalog changes.

 

        /// <summary>
        /// Ensures that the catalog is validated.
        /// </summary>
        protected virtual void EnsureCatalogValidated()
        {
            if (!this.Validated)
            {
                this.Validate();
            }
        }
 
        private void ItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (this.Validated)
            {
                this.EnsureCatalogValidated();
            }
        }
Jun 16, 2011 at 8:30 PM

Hi,

Thank you for notifying this.

We have created a work item in the Issue Tracker to notify the team about this behavior

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic