alibaba/BeeHive

既然 BHContext 和 BeeHive 都被设计成单例,为什么 BeeHive 还需要依赖注入 context ?

Opened this issue · 1 comments

既然 BHContext 和 BeeHive 都被设计成单例,为什么 BeeHive 还需要依赖注入 context ?

[BHContext shareInstance].env = BHEnvironmentDev; //定义应用的运行开发环境
[BHContext shareInstance].application = application;
[BHContext shareInstance].launchOptions = launchOptions;
[BHContext shareInstance].moduleConfigName = @"BeeHive.bundle/CustomModulePlist";//可选,默认为BeeHive.bundle/BeeHive.plist
[BHContext shareInstance].serviceConfigName =  @"BeeHive.bundle/CustomServicePlist";//可选,默认为BeeHive.bundle/BHService.plist
[[BeeHive shareInstance] setContext:[BHContext shareInstance]];

设计上存在不合理性,欢迎来修改~