StructureMap Registry in WCF

Following the post by Jimmy Bogard,  with Oran’s example, I figured this out finally. So I can remove the xml config file for both winForm and WCFHost.

I was wondering how to do the similar process in WCF just like appStart in WinForm, even it was so complicated, but it’s feasible, by implementing my own wcf service Factory.

It works with CSLA just like a charm. The only thing you should keep in mind is, in unit-test, still use ObjectFactory.Inject(). Don’t try to touch registry unitll you want to test registry configuration itself.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s