I have an ObservableCollection which is manipulated by a couple of classes. I want to find out which class fired the event. I already looked at the sender object and went through the properties of the NotifyCollectionChangedEventArgs but did not find anything. I only get the reason for the event such as: Reset, Add or Remove. What I am looking for is the originator.
private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e){
// if coming from one class do something
// else if coming from another class do something else
}
The purpose of this is that I need my collection to behave in a different way depending on the class that modified it.