Verify all collections with Before<name> events with a cancel option are coded properly


Make sure all code for raising before<name> events are coded properly like so...
if (BeforeAdded != null)
bool Cancel = false;
BeforeAddedEventHandler[] l;
l = this.BeforeAdded.GetInvocationList();
for (int idx = 0; idx < l.Length; idx++)
l[idx](this, Key, item, ref Cancel);
// check if canceled
if (Cancel) return;
... simply calling the events will not work. If there are multiple hooks for the event only the last event will be obeyed without the provided code example above. This check needs to be performed across all xider projects.
Closed Jul 31, 2011 at 6:53 AM by Created by: X
This issue was closed because it related to old Release 2 version which has since been replaced.