For AI agents: the complete documentation index is available at /AchEngine/zh/llms.txt, the full documentation bundle is available at /AchEngine/zh/llms-full.txt, and this page is available as Markdown at /AchEngine/zh/usage/di/locator.md.
ServiceLocator.Setup(provider);var service = ServiceLocator.Resolve<IGameService>();bool exists = ServiceLocator.TryResolve<IGameService>(out var game);ServiceLocator.Clear();