ID

Uploaded

Status

Description

Work Items

Action

2696
by bsnote
Mar 30, 2009
1:52 PM

Being evaluated

StateChanged event is called when we write some value to WorkItem.State dictionary. This call happens inside the code that is locked using WriterLock. So if we subscribe to StateChanged event, the code in this handler should not call the WorkItem.State property. Otherwise a deadlock occurs. I took the RaiseStateChanged method out of code block that is locked using WriterLock.

Download

267
by steven11
Sep 6, 2007
6:50 AM

Being evaluated

Hi,
CAB only allows to define public event publishers and subscriptions with the according attributes. In my opinion this isn't very nice because in FxCop you'll get critical error CA2109 ("Review visible event handlers")
for each event handler. If you name the event handler like GlobalEvents_UICreated() (as I do), you'll get a second error: CA1707 ("Identifiers should not contain underscores"). Sure, I could suppress these messages,
but I'd rather write a patch for the origin of the problem ;-)

The patch works like this:
If you apply the IncludeNonPublicEventsAttribute to a class, the event broker will also search for the non-public event subscriptions / publications. The code for this is straightforward.

mfg Steven

Download

View All
  • 1-2 of 2 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches