| | 1 | | using DCL.Controllers; |
| | 2 | | using DCL.Rendering; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL |
| | 6 | | { |
| | 7 | | public static class ServiceLocatorFactory |
| | 8 | | { |
| | 9 | | public static ServiceLocator CreateDefault() |
| | 10 | | { |
| 629 | 11 | | var result = new ServiceLocator(); |
| | 12 | |
|
| | 13 | | // Platform |
| 629 | 14 | | result.Register<IMemoryManager>(() => new MemoryManager()); |
| 629 | 15 | | result.Register<ICullingController>(CullingController.Create); |
| 681 | 16 | | result.Register<IParcelScenesCleaner>(() => new ParcelScenesCleaner()); |
| 629 | 17 | | result.Register<IClipboard>(Clipboard.Create); |
| 1258 | 18 | | result.Register<IPhysicsSyncController>(() => new PhysicsSyncController()); |
| 629 | 19 | | result.Register<IWebRequestController>(WebRequestController.Create); |
| 681 | 20 | | result.Register<IServiceProviders>(() => new ServiceProviders()); |
| 1258 | 21 | | result.Register<IUpdateEventHandler>(() => new UpdateEventHandler()); |
| | 22 | |
|
| | 23 | | // World runtime |
| 1258 | 24 | | result.Register<IIdleChecker>(() => new IdleChecker()); |
| 1258 | 25 | | result.Register<IAvatarsLODController>(() => new AvatarsLODController()); |
| 1258 | 26 | | result.Register<IFeatureFlagController>(() => new FeatureFlagController()); |
| 1258 | 27 | | result.Register<ISceneController>(() => new SceneController()); |
| 1258 | 28 | | result.Register<IWorldState>(() => new WorldState()); |
| 1258 | 29 | | result.Register<IPointerEventsController>(() => new PointerEventsController()); |
| 1258 | 30 | | result.Register<ISceneBoundsChecker>(() => new SceneBoundsChecker()); |
| 1258 | 31 | | result.Register<IWorldBlockersController>(() => new WorldBlockersController()); |
| 1258 | 32 | | result.Register<IRuntimeComponentFactory>(() => new RuntimeComponentFactory()); |
| | 33 | |
|
| 1258 | 34 | | result.Register<IMessagingControllersManager>(() => new MessagingControllersManager()); |
| | 35 | |
|
| | 36 | | // HUD |
| 1258 | 37 | | result.Register<IHUDFactory>(() => new HUDFactory()); |
| 1258 | 38 | | result.Register<IHUDController>(() => new HUDController()); |
| | 39 | |
|
| 629 | 40 | | return result; |
| | 41 | | } |
| | 42 | | } |
| | 43 | | } |