优化service安装流程

This commit is contained in:
boyce
2019-07-12 10:21:13 +08:00
parent 463498c618
commit 59b59dfddc
2 changed files with 14 additions and 25 deletions

View File

@@ -20,8 +20,22 @@ type CServiceManager struct {
}
func (slf *CServiceManager) Setup(s IService) bool {
s.(IModule).SetOwnerService(s)
s.(IModule).SetOwner(s.(IModule))
s.(IModule).SetSelf(s.(IModule))
slf.localserviceMap[s.GetServiceName()] = s
slf.orderLocalService = append(slf.orderLocalService, s.GetServiceName())
//通知其他服务已经安装
for _, is := range slf.localserviceMap {
//
is.OnSetupService(s)
s.OnSetupService(is)
}
return true
}