Firing generic events with EventAggregator

Topics: Prism v1
Sep 15, 2009 at 4:55 AM

Hi; I'm trying to use generic events with event aggregator with CAG 1.0. Control is not coming to the event subscription handler where as it work perfectly allright with simple types. I don't see runtime errors either. pl let me know if I’m doing something wrong. Code snippet is given below. Thanks in advance.

public class AddSDCCriteriaItem<T> : CompositeWpfEvent<SDCSessionCriteriaItem<T>> where T:DatabaseItem { }



                                                                              Microsoft.Practices.Composite.Wpf.Events.ThreadOption.UIThread, true);

public void AddCriteriaHandler<T>(SDCSessionCriteriaItem<T> SelecedCriteriaItem) where T : DatabaseItem

 //do something...  

And the payload is,

public class SDCSessionCriteriaItem <T> where T: DatabaseItem


        public MetaData.DataItem SDCDataItem;
        private List<T> _selectedValues;
        public List<T> SelectedValues
                if (_selectedValues == null)
                    _selectedValues = new List<T>();
                return _selectedValues;
                _selectedValues = value;
        public SDCSessionCriteriaItem() { }

Sep 15, 2009 at 11:51 PM


I have tried to reproduce your error using the Prism Event Aggregator quickstart with no success as the event did get to the handler. I have uploaded the outcome solution here so you can check the differences to find the issue.

Please let me know if this helps.

Damian Schenkelman

Sep 23, 2009 at 1:40 PM

Hi Damian; Thanks for your reply and accept my apologies for late response on this. I'm still having same issue at my end, not sure where is the issue L. Appreciate if you can further put any thought were i can I need to have a look, any specific area you can suggest for debugging.