阅读背景:

什么是“关闭”类实例的正确设计模式?

来源:互联网 

Let's say I have a class with a bunch of methods and I want those methods to essentially no-op if a flag in a config file is turned off. . What would be the type of design pattern to follow? I've thought of hacky things like conditionally running methods (e.g. Let's say I have a class with a bunch of method




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: