views:

17

answers:

1

I want to have several different versions of my software based on a parameter passed in on the request. I'm currently trying to accomplish this with profiles.

What I need to know is, if I have something like (pseudo)

ObjectFactory.Profile = Request.Params["version"];
var instance = ObjectFactory.GetInstance(...);

is it possible for a competing request to change the profile before structure map has finished constructing my instance and it's dependencies?

Thanks.

A: 

Have you considered putting a lock around the construction code?

Eric