Removing Commands from Work Item

Topics: General discussion
Apr 29, 2010 at 10:17 AM

Hi All,




As part of a Presenter termination i would like to remove all the commands related to the presenter. AFAIK each command include the following Event Handler


command.ExecuteAction += new EventHandler(command_ExecuteAction);


When I try to remove the commands from my Presenter’s Work Item I try the following code:  


commandPair.Value.ExecuteAction -=new EventHandler(command_ExecuteAction);




However I get the following error  


Removing Commands from WorkItem is not permitted. An attempt was made to remove the command f7f6b5c1-dd39-43ca-8393-38b609c1d031_Search.
Parameter name: item


I have 2 questions:

Assuming that my commands are not related to any other Handlers, Invocation etc. what is the reason I cannot remove these commands or why don’t I have permission to?

If the commands DO related to something how can I find it? how can I get the real reason why I don’t have permission? 

Thanks ahead.
























Apr 29, 2010 at 10:32 AM

Your inquiry seems to be a non-entlib related topic. Please post your inquiry to other discussion forum. Thanks 

Gino Terrado
Global Technology and Solutions
Avanade, Inc.