Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于服务多个实现类的处理 #47

Closed
guozhiqiang123 opened this issue Dec 25, 2019 · 9 comments
Closed

关于服务多个实现类的处理 #47

guozhiqiang123 opened this issue Dec 25, 2019 · 9 comments

Comments

@guozhiqiang123
Copy link

一个服务接口下面有多个实现类,我想能拿到每一个实现类的实例,能做到吗

@xiaojinzi123
Copy link
Owner

目前是不支持的。你可以先和我你的场景, 我这边如果觉得你的场景合理。我会在近个版本添加上此功能的

:octocat: From gitme iOS

@guozhiqiang123
Copy link
Author

之前是使用AutoService进行Application生命周期分发的,如果本库能提供这个方法,一是可以不用引用AutoService库,二是效率上可能有所优化。路由框架最大的作用是服务于模块化或者组件化,路由、服务、初始化,这三个功能如果在一个库里面集成,我觉得好处有三:一是整体架构,性能更好;二是减少包体积;三是统一的调用,更加容易上手。

@guozhiqiang123
Copy link
Author

初始化我指的是多个第三方库引用的时候,可以控制初始化顺序还有异步初始等

@xiaojinzi123
Copy link
Owner

xiaojinzi123 commented Dec 25, 2019

你说的挺对的。我的库目前提供了生命周期的功能。至于怎么初始化每个模块,同步还是异步和我没关系,顺序也是你自己控制的。路由模块不用说了,现在基本找不出比我这个强大的了。服务这块我暂时没看到你说场景,你只说了 AutoServive 这个库。我一直奉行有需求再考虑做这个功能。所以请你简单说下你多实现的用途。
我会很谨慎的考虑,如果可以,下个版本就提供给你用了

:octocat: From gitme iOS

@guozhiqiang123
Copy link
Author

目前需求就只有一个,分发Application的生命周期,这个文档我没有找到,麻烦贴一下

@guozhiqiang123
Copy link
Author

谢谢了

@guozhiqiang123
Copy link
Author

谢谢了

@xiaojinzi123
Copy link
Owner

xiaojinzi123 commented Dec 25, 2019

这个生命周期功能是可选的,有其他问题在打开就好。谢谢

:octocat: From gitme iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants