tag:blogger.com,1999:blog-8942599.post5732310887291065735..comments2024-03-15T03:24:33.607-04:00Comments on the urban canuk, eh: Testing Asynchronous Logicbryanhttp://www.blogger.com/profile/01332614158223702009noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8942599.post-66652069291029401352011-07-12T10:12:35.583-04:002011-07-12T10:12:35.583-04:00I appreciate your comment and feedback, but respec...I appreciate your comment and feedback, but respectfully an <i>Action</i> is not a valid event delegate. <a href="http://msdn.microsoft.com/en-us/library/ms182133(v=vs.80).aspx" rel="nofollow">Best practices</a> and <a href="http://stackoverflow.com/questions/2036656/difference-between-eventhandler-and-delegete-void/2036665#2036665" rel="nofollow">well respected authorities</a> outline that the event should publish who raised the event and any details surrounding that event.<br /><br />Note that... <br /><br /><i>public event EventHandler EventOccurred;</i> <br /><br />...would satisfy best practices, and ...<br /><br /><i>foo.EventOccurred += (o,e) => CallMethod();</i><br /><br />... would achieve the same effect of assigning an <i>Action</i>bryanhttps://www.blogger.com/profile/01332614158223702009noreply@blogger.comtag:blogger.com,1999:blog-8942599.post-20115564901878689012011-07-12T03:51:02.558-04:002011-07-12T03:51:02.558-04:00Sounds interesting but I tried to use it and hit t...Sounds interesting but I tried to use it and hit the issue about the code assuming events always have two arguments.<br /><br />My event declaration looks like this:<br /><br />public event Action EventOccured;Anonymousnoreply@blogger.com