MainContainer.cs 405 B

123456789101112131415161718192021
  1. namespace QFramework.Example
  2. {
  3. public class MainContainer : QFrameworkContainer, ISingleton
  4. {
  5. private MainContainer()
  6. {
  7. }
  8. public static IQFrameworkContainer Container
  9. {
  10. get { return SingletonProperty<MainContainer>.Instance; }
  11. }
  12. void ISingleton.OnSingletonInit()
  13. {
  14. // 注册网络服务模块
  15. RegisterInstance<INetworkExampleService>(new NetworkExampleService());
  16. }
  17. }
  18. }