In the strategy pattern can the strategy take the Context as parameter

后端 未结 4 1410

Feedback summary

I will now close this thead (I think there will be no more feedback) and try to summarize what I understood

  1. using the \"Contex
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-31 10:58

    IMHO, it's ok. but I prefer pass the context to the strategy through the constructor of the strategy implementation class.

提交回复
热议问题