How to remove an ObjectBuilder Strategy

Topics: Building and extending application blocks
May 12, 2008 at 10:09 PM

My question is how to remove an ObjectBuilder strategy from the builder.Strategies collection?  I am using CAB and have made a few changes to how the Command pattern works.  I needed the ability to pass an argument to the Execute method of Command.  I modified several classes including CommandStrategy, Command and CommandAdapter.  I can reference the modified CompositeUI dll directly but I would like to avoid this so I can easily upgrade to new releases without merging my changes into the new release.  My goal is to implement my command strategy in my infrastructure.library project.  Then remove the CompositeUI command strategy and add my Modified CommandStrategy to the builder in the override of IGWindowsFormsApplicationBase.AddBuilderStrategies in ShellApplication.

The problem is that the Strategies colleciton on Builder doesnt provide a way to remove a strategy (besides clearing the entire contents). 

Is this approach the correct way to go about things?
If so, how can I swap out my modified commandstrategy for the existing one?

Thanks for your help.
May 13, 2008 at 1:05 PM
ObjectBuilder's discussion list is more appropriate for this question.

Fernando


aschaeffer wrote:

My question is how to remove an ObjectBuilder strategy from the builder.Strategies collection?  I am using CAB and have made a few changes to how the Command pattern works.  I needed the ability to pass an argument to the Execute method of Command.  I modified several classes including CommandStrategy, Command and CommandAdapter.  I can reference the modified CompositeUI dll directly but I would like to avoid this so I can easily upgrade to new releases without merging my changes into the new release.  My goal is to implement my command strategy in my infrastructure.library project.  Then remove the CompositeUI command strategy and add my Modified CommandStrategy to the builder in the override of IGWindowsFormsApplicationBase.AddBuilderStrategies in ShellApplication.

The problem is that the Strategies colleciton on Builder doesnt provide a way to remove a strategy (besides clearing the entire contents). 

Is this approach the correct way to go about things?
If so, how can I swap out my modified commandstrategy for the existing one?

Thanks for your help.