Stairway pattern implementation

后端 未结 3 867
小蘑菇
小蘑菇 2020-12-08 02:34

I came across \"Stairway\" pattern description in the \"Adaptive code via C#\" book and I don\'t really understand how this is supposed to be implemented:

3条回答
  •  爱一瞬间的悲伤
    2020-12-08 03:23

    I would put it in the ServiceFactory. You need some parameter e.g. passed in the factory constructor or retrieved from configuration etc. that determines which IService implementation gets created by the factory.

提交回复
热议问题