0

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.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
jbenckert
  • 964
  • 1
  • 10
  • 19

1 Answers1

0

Have you considered putting a lock around the construction code?

Eric
  • 466
  • 6
  • 9